News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: SMAS: Auto load of specific game  (Read 835 times)

poltergasm

  • Newbie
  • *
  • Posts: 3
    • View Profile
SMAS: Auto load of specific game
« on: March 10, 2018, 05:17:53 pm »
Hey guys,

I'm really new to ROM hacking, so I'm not sure if this is possible, but I was wondering if there's a way to have SMAS automatically load a particular game? In my case I'm wanting SMAS to just offer Super Mario Bros. Basically I want it to skip all the menu stuff and just go straight into a particular game.
I've tried it myself, but ended up causing the game to load a black screen and play music I didn't even know was on the ROM..

Many thanks.

zstandig

  • Jr. Member
  • **
  • Posts: 48
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #1 on: March 11, 2018, 03:39:33 pm »
It's a good idea.  The way we load roms off of emulators and flash carts means that games like these just add yet another menu to go through.  Space is hardly an issue, so having four copies of SMAS, one for each game would subvert the need for the in-game selection menu.

It would also mean that individual hacks could be made for each game, or we could have the SMAS+World version of SMW as a stand alone rom with it's own patches and whatnot.

I can't help you, but I support your concept  8)

zacmario

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #2 on: March 12, 2018, 09:31:42 am »
There is a SMAS forum at smw central. Within that fourum you can find a rom map for smas.

poltergasm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #3 on: March 12, 2018, 10:19:58 am »
There is a SMAS forum at smw central. Within that fourum you can find a rom map for smas.
Heya. Yep I've seen that one. Unfortunately, like I said, I'm new to rom hacking. I can make very basic edits, but trying to load a particular scene is something I'm not really comfortable with. Just looking for a point in the right direction really.

dACE

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #4 on: March 12, 2018, 04:07:47 pm »
Good Luck!

/dACE
« Last Edit: March 13, 2018, 11:13:30 am by dACE »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #5 on: March 12, 2018, 04:18:51 pm »
Here:
https://github.com/Ersanio/SMAS-Disassembly/blob/master/Assembly/b00.asm

You can try looking around that disassembly.
The offsets in particular where the pointer should be located must be around $008000 and $02FFFF, since that is the code for the "Presents" screen, hall screen and game select screen.
The games begin at $038000.

I stumbled upon this tidbit of info into that link I sent you:
Code: [Select]
DATA_008194:    db CODE_038000                                  ;Indirect game pointers.
                db CODE_0D8000                                  ;SMB1, SMBTLL, SMB2, SMB3
                db CODE_118000                                  ;
                db CODE_208000                                  ;
That seems to be the pointer data for each game.
Also take a look at this:
Code: [Select]
DATA_0080A6:    db CODE_009BC0                                  ; Nintendo Presents Screen + Title screen
                db CODE_00A2D8                                  ; Set up game select screen
                db CODE_00A39B                                  ; Game select screen
                db CODE_00B1CE                                  ; Open erase file box
                db CODE_00B440                                  ; Erase file box
                db CODE_00B2A5                                  ; Close erase file box
                db CODE_00A2C5                                  ; Fade out of game select screen
                db CODE_0089F9                                  ; Setup game
                db CODE_0081A0                                  ; Setup game
                db CODE_00822B                                  ; Bring up game-play demo
                db $00                                          ; (null)
That (alongside the previous table) should give you a good start on trying to pin point the correct pointer and its offset.

poltergasm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SMAS: Auto load of specific game
« Reply #6 on: March 12, 2018, 04:44:33 pm »
Here:
https://github.com/Ersanio/SMAS-Disassembly/blob/master/Assembly/b00.asm

You can try looking around that disassembly.
The offsets in particular where the pointer should be located must be around $008000 and $02FFFF, since that is the code for the "Presents" screen, hall screen and game select screen.
The games begin at $038000.

I stumbled upon this tidbit of info into that link I sent you:
Code: [Select]
DATA_008194:    db CODE_038000                                  ;Indirect game pointers.
                db CODE_0D8000                                  ;SMB1, SMBTLL, SMB2, SMB3
                db CODE_118000                                  ;
                db CODE_208000                                  ;
That seems to be the pointer data for each game.
Also take a look at this:
Code: [Select]
DATA_0080A6:    db CODE_009BC0                                  ; Nintendo Presents Screen + Title screen
                db CODE_00A2D8                                  ; Set up game select screen
                db CODE_00A39B                                  ; Game select screen
                db CODE_00B1CE                                  ; Open erase file box
                db CODE_00B440                                  ; Erase file box
                db CODE_00B2A5                                  ; Close erase file box
                db CODE_00A2C5                                  ; Fade out of game select screen
                db CODE_0089F9                                  ; Setup game
                db CODE_0081A0                                  ; Setup game
                db CODE_00822B                                  ; Bring up game-play demo
                db $00                                          ; (null)
That (alongside the previous table) should give you a good start on trying to pin point the correct pointer and its offset.

Oh wow, that's incredibly helpful. Thank you!