Sonic and Sega Retro Message Board: Checksum Check = Bad - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

Checksum Check = Bad Fuzzbuzz's fix = Good

#16 User is offline Sonic Hachelle-Bee 

Posted 12 June 2004 - 05:11 PM

  • Lost in Wood zone
  • Posts: 716
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version

Quote

I know,probably the only difference between the lock on different roms is some value in a routine that tell to jump to different part of code

I'm working on the lock-on technology with S2&K long version.
There is a LOT of jumps under the extra 256KB of S2&K.
Actually, the S&K part is useless to run S2&K correctly. All the game data (except Knuckles frames) is under this extra 256KB, or under the S2 part.
Locking my hack with S&K works with some modifications.

#17 User is offline drx 

Posted 12 June 2004 - 05:17 PM

  • <Shade> fuck MJ
  • Posts: 2119
  • Joined: 02-March 04
  • Gender:Male
  • Project::rolleyes:
  • Wiki edits:8
Checksum checking sub is always the same:

ChecksumCheck: 	 ; CODE XREF: ROM:0000030Ej
  movea.l	#$200,a0
  movea.l	#RomEndLoc,a1
  move.l	(a1),d0
  moveq	#0,d1

loc_32C: 	 ; CODE XREF: ROM:00000330j
  add.w	(a0)+,d1
  cmp.l	a0,d0
  bcc.s	loc_32C
  movea.l	#Checksum,a1; Checksum
  cmp.w	(a1),d1	; Compare correct checksum to the one in ROM
  bne.w	ChecksumError


which equals to this in machine code:
207C 0000 0200 
227C 0000 01A4
2011 7200
D258 
B088 
64FA
227C 0000 018E 
B251
6600 00xx


Just nop out the 6600 00xx.

#18 User is offline fuzzbuzz 

Posted 15 June 2004 - 12:15 AM

  • Posts: 625
  • Joined: 13-November 03
  • Gender:Male
  • Location:Here
  • Project:Many Many Programming/hacking tools...
NOPs are 4E71, for people who don't know.

#19 User is offline LocalH 

Posted 15 June 2004 - 02:01 AM

  • roxoring your soxors
  • Posts: 3147
  • Joined: 11-January 03
  • Gender:Male
  • Location:wouldn't you like to know
  • Project:MDEM - Genesis programming stufz
  • Wiki edits:3

Sonic Hachelle-Bee, on Jun 12 2004, 05:11 PM, said:

Quote

I know,probably the only difference between the lock on different roms is some value in a routine that tell to jump to different part of code

I'm working on the lock-on technology with S2&K long version.
There is a LOT of jumps under the extra 256KB of S2&K.
Actually, the S&K part is useless to run S2&K correctly. All the game data (except Knuckles frames) is under this extra 256KB, or under the S2 part.
Locking my hack with S&K works with some modifications.

Yeah, you're correct, I looked, and I believe the only access to the 256K ROM (S&KUPMEM), in the main S&K ROM, is a single JMP $300000. The code and a few of the tiles is in S&KUPMEM, and the rest comes from the S2 ROM at $200000. Theoretically, as long as your hack doesn't extend the ROM, all you have to do to get S2&K to work with your hack, is modify all the pointers in S&KUPMEM to match those you modified in S2, with $200000 added to them. If your hack is longer, you'd have to derive a disassembly with Nemesis' method and reassemble S&KUPMEM to start at the total size of your hack + $200000, and then modify the JMP $300000 to match that same address. You shouldn't have to modify your hack just to get it to work with S&K.

At least, that'd be the best way to do it if you're trying to stay faithful to the original lockon concept, which was to take the unmodified Sonic 2 cart and wrap it in new code.
This post has been edited by LocalH: 15 June 2004 - 02:03 AM

#20 User is offline Sonic Hachelle-Bee 

Posted 15 June 2004 - 08:22 AM

  • Lost in Wood zone
  • Posts: 716
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version

Quote

Yeah, you're correct, I looked, and I believe the only access to the 256K ROM (S&KUPMEM), in the main S&K ROM, is a single JMP $300000 (...) to work with S&K.

That's not exactly what I'm doing.
I've found that the S2&KUPMEM has almost all the data to run the game correctly. Some data is taken from S2, but that's very few.
Instead of keeping the useless S&K part, I copied my hack. There is now my hack, some data for Knuckles, the end of the game and sprites placement, S2 at $200000 and the UPMEM at $300000 (there is no more lock-on at this point).
Changing the vector table, my rom now starts at $300000 directly (without this JMP feature that was under S&K that's now removed).
I made a list of all things I have to take from my hack (like palettes, level layouts, mappings and art data for the new levels...). I have changed some pointers and some code under the UPMEM to take the data from my hack instead of S2 or the UPMEM.
This way, I don't modify my hack and S2, but I'm hacking the UPMEM itself, changing his pointers to take all I need to build the Long Version.
All is perfect now, but I have again a little problem with the new sprites that come from S2 beta (dinobot, trycerobot...) and with the debug mode password.
After one week (only?) of hard work, S2&K Long Version is almost ready! :P

EDIT: Sorry, that may be a little off topic but...
This post has been edited by Sonic Hachelle-Bee: 15 June 2004 - 08:28 AM

#21 User is offline LocalH 

Posted 15 June 2004 - 12:49 PM

  • roxoring your soxors
  • Posts: 3147
  • Joined: 11-January 03
  • Gender:Male
  • Location:wouldn't you like to know
  • Project:MDEM - Genesis programming stufz
  • Wiki edits:3

Sonic Hachelle-Bee, on Jun 15 2004, 08:22 AM, said:

Quote

Yeah, you're correct, I looked, and I believe the only access to the 256K ROM (S&KUPMEM), in the main S&K ROM, is a single JMP $300000 (...) to work with S&K.

That's not exactly what I'm doing.
I've found that the S2&KUPMEM has almost all the data to run the game correctly. Some data is taken from S2, but that's very few.
Instead of keeping the useless S&K part, I copied my hack. There is now my hack, some data for Knuckles, the end of the game and sprites placement, S2 at $200000 and the UPMEM at $300000 (there is no more lock-on at this point).
Changing the vector table, my rom now starts at $300000 directly (without this JMP feature that was under S&K that's now removed).
I made a list of all things I have to take from my hack (like palettes, level layouts, mappings and art data for the new levels...). I have changed some pointers and some code under the UPMEM to take the data from my hack instead of S2 or the UPMEM.
This way, I don't modify my hack and S2, but I'm hacking the UPMEM itself, changing his pointers to take all I need to build the Long Version.
All is perfect now, but I have again a little problem with the new sprites that come from S2 beta (dinobot, trycerobot...) and with the debug mode password.
After one week (only?) of hard work, S2&K Long Version is almost ready! :P

EDIT: Sorry, that may be a little off topic but...

(I know this is OT, sue me) So what you're saying is, your hack won't need the S&K ROM at all or something? That you could put some hidden easter egg texts in the S&K ROM area? Just trying to think of some fun things to do with it, is all ^_^

#22 User is offline Quickman 

Posted 15 June 2004 - 01:41 PM

  • Posts: 5584
  • Joined: 03-December 03
  • Gender:Male
  • Location::x
  • Project:omg porjcet
  • Wiki edits:10

LocalH, on Jun 15 2004, 05:49 PM, said:

... you could put some hidden easter egg texts in the S&K ROM area?

Reminds me of the end of one of Cyan Helkaraxe's programmed doohickies with a secret message to hackers on the end.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users