Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Hang On prototype (red card)

Reply to topic
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Hang On prototype (red card)
Post Posted: Sun Oct 29, 2017 11:51 am
Last edited by Bock on Thu Mar 28, 2019 9:58 am; edited 1 time in total
Finally had a chance to dump my "Red" Hang On card, and it is an unknown dump. This is the one I bought:
http://www.smspower.org/forums/15029-PreReleaseMasterSystemGames#89860

Amusingly for the first time I have used this setup of using 2 adapters to dump it (see picture).


SMS Check 0.24 - by Omar Cornut (Bock), Apr 19 2016
http://www.smspower.org
--

[./Hang On (JP).sms]
Size ...... 32768
Header .... 45 50 2E 20 31 31 20 31 39 38 35 20 02 05 00 3C
System .... SMS Japan (3)
Size ...... 32k
CheckSum .. 1E52, Bad. Should be 2035
FullSum ... 2A20F1

[./Hang On.sms]
Size ...... 32768
Header .... 54 4D 52 20 53 45 47 41 19 86 73 83 81 40 00 4C
System .... SMS Export (4)
Size ...... 32k
CheckSum .. 8373, Ok
FullSum ... 2B8848

[./sms-hangon-proto-red.sms]
Size ...... 32768
Header .... 54 4D 52 20 53 45 47 41 19 86 19 84 00 00 00 4C
System .... SMS Export (4)
Size ...... 32k
CheckSum .. 8419, Ok
FullSum ... 2B87D4


>fc /b rom.sms "Hang On (JP).sms"|wc
  31825   95479  541054

>fc /b rom.sms "Hang On.sms" | wc
  14539   43620  247187

(which vaguely suggest it may be closer to the Western version)

Interestingly, when booted on a JAPANESE emulated system which doesn't clear the RAM, but rather leaves patterns of 0xF0 in RAM (MEKA emulate this behavior that I have confirmed on various Japanese SMS), this version of the game exhibit glitches (title screen, attract mode is glitchy). And the two other releases versions don't have this glitch. Attached 2 shots of the glitches.

It would be nice to identify a bit better if this is indeed a version between the Japanese or Western, or if it came earlier than both releases.

  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 530
Reply with quote
Post Posted: Sat Dec 22, 2018 7:21 pm
Where did you get the SMS-to-Mark III adapter? Are they available either for sale or as easy-to-order PCB layouts?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Sat Jan 26, 2019 10:06 am
bsittler wrote
Where did you get the SMS-to-Mark III adapter? Are they available either for sale or as easy-to-order PCB layouts?

Ichigobankai made them for me.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Oct 2014
  • Posts: 27
  • Location: Sunnyvale, California
Reply with quote
Post Posted: Mon Apr 01, 2019 12:05 am
The prototype is actually very close to the Western version, there are only 3 real changes between them.
As you mentioned, the released version includes a loop to zero all RAM during boot, which is 12 bytes long:

ColdBoot:              ; (at address 00A7 in Western ROM)
    ld hl, $c000                    ;\
    ld de, $c001                    ;|
    ld bc, $1ffc                    ;| this is a cold boot so zero entire RAM.
    ld (hl), l                      ;|
    ldir                            ;/

After that both versions copy in RAM the routine that updates the Xscroll values per line (used to "bend" the road and scroll the scene at the horizon in the top half of the screen), then copy the string "NAOMI" at a certain location in RAM (used to detect warm vs. cold boot).
After that the released version starts initializing VDP & loading graphics, but the prototype version does this first (5 bytes long):

   ld a, $05
   ld ($ffff), a

which selects ROM bank 5 for the $8000-$bfff address range.
Of course this is useless on a 32 KB ROM so I gues this was the last leftover of some debug code that was used on a dev cart during development?

From that point on, there is an offset of 12 - 5 = 7 bytes from the proto to the release version, and almost all differences you see in the binary ROM are absolute addresses (for example operands of CALL and JMP instructions). Once you patch all these, the only difference left is the ROM header in the last 16 bytes.
The header in the release version is:

RomHeader:
.db "TMR SEGA"
.db $19, $86            ;  year? stored in reserved word
.db $73, $83            ;  checksum
.db $81, $40, $00       ;  product code 4018, version 0 (first release)
.db $4c                 ;  SMS Export, 32 KB

The header in the prototype version is:

RomHeader:
.db "TMR SEGA"
.db $19, $86            ;  year? stored in reserved word
.db $19, $84            ;  checksum
.db $00, $00, $00       ;  product code 0, version 0 (first release)
.db $4c                 ;  SMS Export, 32 KB


PS: Special thanks to Calindro for the disassembly feature of Emulicious!
I used it to generate a disassembly of the prototype version, then iterated on it by doing changes to the source code and reassembling it until I got a match with the released version. Because it's very good at generating labels, and identifying references to them, I had to manually patch in the +7 bytes offset in only 7 locations instead of hundreds...
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Mon Apr 01, 2019 10:27 am
Wow, thanks for digging into that!
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2015
  • Posts: 89
Reply with quote
Post Posted: Thu Apr 04, 2019 6:44 pm
The box of the Japanese MyCard release of Hang-On shows a screenshot with horizontal striping across the road (similar to what we see in Out Run). Were there any releases of Hang-On that retained this horizontal striping? Or was that changed before any of the releases?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Fri Apr 05, 2019 8:53 am
Centrale wrote
The box of the Japanese MyCard release of Hang-On shows a screenshot with horizontal striping across the road (similar to what we see in Out Run). Were there any releases of Hang-On that retained this horizontal striping? Or was that changed before any of the releases?


Very good point.. hadn't noticed.
I don't know if later stages of the Japanese version have it.

It should be fairly easy to do, it is basically extending the center stripe wide enough to cover the road.

  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!