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 - Ports $19 & $3A

Reply to topic
Author Message
  • Joined: 14 Nov 2010
  • Posts: 5
  • Location: O'fallon, Missouri
Reply with quote
Ports $19 & $3A
Post Posted: Sat Apr 11, 2020 12:56 am
As you may know, I've been working on a Sonic Chaos Master System disassembly for quite sometime now. I however lost the original disassembly over time, and recently started another one from scratch and found out that the game makes reference to ports $19 and $3A. I haven't seen these ports be referenced in other Sonic titles for the SMS/GG, or at least the games that I've modified before. (I've only looked at Sonic 1, 2, Drift, and Chaos in depth...) These ports are only referenced in the ROM at offset $3DC4. Here's a tidbit of the code:

        out (_PORT_3A_), a
   sbc a, a
   out (_PORT_19_), a
   jr nc, +
   inc a
   ld (_RAM_D39D_), hl

I'm just curious to see if you've seen these ports being referenced in other titles. Oh and on another note, Sonic Drift 1 & 2 access port $DE upon loading the demo code, which is odd seeing how it's primary use is the keyboard on a SG-1000/SC-3000/Mark III.
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 585
  • Location: Adelaide, Australia
Reply with quote
Ports $19 & $3A
Post Posted: Sat Apr 11, 2020 4:40 am
Are you sure that these bytes are program code?

The code will either write 00 or FF to IO Port 19 depending on what the carry flag is from the preceding code. Seems pointless.
  View user's profile Send private message
Reply to topic

Back to the top of this page

Back to SMS Power!