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 - My header reader

Reply to topic
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
My header reader
Post Posted: Mon Mar 19, 2001 8:39 pm
After some hours of trying to figure it out, I've found the (perhaps obvious) way the BIOS checksums Codemasters games when it's sending out Sega mapper messages. For the full story, read the readme in my header reader, but the basic result is: when checksumming a Codemasters game with a 256KB checksum range nibble, it actually checksums page 0 15 times, and page 1 (minus the 16 bytes for the Sega header) once. I'm sure there's some significance to be gleaned from this fact, but it escapes my feeble Earth brain.

Oh, and my header reader now tries this method if a rom fails the normal checksum. That qualifies as an update, and more than enough reason to post about it :o).

Maxim
  View user's profile Send private message Visit poster's website
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Mon Mar 19, 2001 10:11 pm
Quote
> After some hours of trying to figure it out, I've found the (perhaps obvious) way the BIOS checksums Codemasters games when it's sending out Sega mapper messages. For the full story, read the readme in my header reader, but the basic result is: when checksumming a Codemasters game with a 256KB checksum range nibble, it actually checksums page 0 15 times, and page 1 (minus the 16 bytes for the Sega header) once. I'm sure there's some significance to be gleaned from this fact, but it escapes my feeble Earth brain.

Good thing you have brought.

Obviously the reason is that the checksumming use the standard sega mapper for paging, and writing to 0xFFFF has no effect on a Codemasters cartridge.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Mon Mar 19, 2001 10:46 pm
Quote
> Obviously the reason is that the checksumming use the standard sega mapper for paging, and writing to 0xFFFF has no effect on a Codemasters cartridge.

Yes, Mike G pointed that out to me. But the "interesting" thing is what pages are returned when it tries to use the standard paging with the Codemasters mapper. The fact that it does checksum page 1 means that it does check 0x4000 to 0x7FEF before any paging into frame 1. However, to checksum pages higher than 2 it must page them. It can't page them into frame 0, since the first 1KB is not paged, unless the BIOS doies not have this limitation. It can't page them into frame 1 because that must contain page 1, since that is successfully checksummed, and after a failed paging would still contain page 1, not page 0. So it must (?) use frame 2; however, it returns page 0. This seemed odd to me, but as I said,

> "I'm sure there's some significance to be gleaned from this fact, but it escapes my feeble Earth brain."

Maxim
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Re: My reader header
Post Posted: Tue Mar 20, 2001 3:50 am
The codemasters games have a different "real" checksum then the one which is in the rom dont they?
One thing I have noticed with Cosmic Spacehead is that it writes to its paging register ($8000) 100's of times per second. Another thing I have noticed in the scrolling stages is that no more data is loaded into the vram then what is put on the screen. Which is why the horizontal scrolling screws up. Its obviously trying to put data to vram but the data hasnt changed, leading to crappity crap being displayed on the screen.
Another thing, there is a value in ram which the rom puts in which is the exact same value it writes to $8000 every SINGLE time it pages. Obviously its just a place where they keep track of what page number is paged in. Why is it writing to $8000 100's of times per second though, it seems strange , i think its because some value isnt being changed when $8000 is written to , which the program must check, but after 2 hours of disassembling i couldnt find it. Need ... more... time :P
-Jason Starr-
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
btw, a few nitpicks in SMSChecker
Post Posted: Tue Mar 20, 2001 8:34 am
...which rocks, btw. I've been suffering through with headers and footers and overdumps for some time now, irritated that ghost house is 262656 bytes but too lazy to do anything about it, and all those go away with two clicks.
But, in the section for demos:


Page Frame Register Detect, Z80 port dumper, and Interactive Sprite Demo are incorrectly creditted to me. PFR is Eric's doing, and I'm not sure about the other two (z80 port dumper sounds like something Eric would do but I'll let him speak up if it's his).
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Re: btw, a few nitpicks in SMSChecker
Post Posted: Tue Mar 20, 2001 12:03 pm
Port dumper is by Charles Macdonald, the sprite thing Im prety sure he made it too. Charles was on the board before saying he would like peopleto test them so i assume he made them
 
  • Joined: 18 Sep 1999
  • Posts: 498
  • Location: Portland, Oregon USA
Reply with quote
Re: btw, a few nitpicks in SMSChecker
Post Posted: Tue Mar 20, 2001 6:14 pm
Quote
> Port dumper is by Charles Macdonald, the sprite thing Im prety sure he made it too. Charles was on the board before saying he would like peopleto test them so i assume he made them

I can only confirm that I wrote PFR_Detect. (I should update it to include the SDSC ROM tag...)

--
Eric Quinn
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: btw, a few nitpicks in SMSChecker
Post Posted: Tue Mar 20, 2001 6:48 pm
Quote
> ...which rocks, btw. I've been suffering through with headers and footers and overdumps for some time now, irritated that ghost house is 262656 bytes but too lazy to do anything about it, and all those go away with two clicks.
> But, in the section for demos:

>
> Page Frame Register Detect, Z80 port dumper, and Interactive Sprite Demo are incorrectly creditted to me. PFR is Eric's doing, and I'm not sure about the other two (z80 port dumper sounds like something Eric would do but I'll let him speak up if it's his).

Maxim, I wrote the port dumping and sprite demo programs.


  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Re: My reader header
Post Posted: Tue Mar 20, 2001 8:23 pm
Quote
> The codemasters games have a different "real" checksum then the one which is in the rom dont they?

Yeah. The Sega checksum can only check the first 32KB. CS has a 32KB checksum range, so that was OK, but since it's also supposed to be a rom size indicator, the recent dumps have it set to 256KB, but still it's only pages 0 and 1 that are checked like I said.

Anyway, both CS and MM have a checksum of sorts which you get by holding down 1 and 2 when booting. I haven't been able to get it to work on FreezeSMS though.

Quote
> One thing I have noticed with Cosmic Spacehead is that it writes to its paging register ($8000) 100's of times per second.

I seem to remember Zoop blaming that on the use of a higher-level language with compiler deficiencies.

Maybe a redump using Mike G's super-duper 2-cart method would help? The first 32KB passes the checksum, like I said.

Maxim
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Thanks, guys
Post Posted: Tue Mar 20, 2001 8:33 pm
Quote
> ...which rocks, btw. I've been suffering through with headers and footers and overdumps for some time now, irritated that ghost house is 262656 bytes but too lazy to do anything about it, and all those go away with two clicks.

Glad to be of service :o)

Quote
> But, in the section for demos:

> Page Frame Register Detect, Z80 port dumper, and Interactive Sprite Demo are incorrectly creditted to me. PFR is Eric's doing, and I'm not sure about the other two (z80 port dumper sounds like something Eric would do but I'll let him speak up if it's his).

Yeah. Those names are only preliminary, I was offline when I added them, and that's why they're not actually used anywhere. And I was a bit over-eager with the Shift+Insert. I'll fix them up.

So, changed lines:

Interactive Sprite Test,Charles MacDonald
Page Frame Register Detect,Eric Quinn
Page Frame Register Detect 1.00,Eric Quinn
Z80 port dumper,Charles MacDonald

They'll be in next time I update.


Oh, and Heliophobe, if you're getting credit for other people's good work, you're supposed to keep quiet! :o)

Maxim
  View user's profile Send private message Visit poster's website
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Re: My reader header
Post Posted: Tue Mar 20, 2001 10:43 pm
Quote
>> One thing I have noticed with Cosmic Spacehead is that it writes to its paging register ($8000) 100's of times per second.
> I seem to remember Zoop blaming that on the use of a higher-level language with compiler deficiencies.
> Maybe a redump using Mike G's super-duper 2-cart method would help? The first 32KB passes the checksum, like I said.

There's no problem with Cosmic Spacehead, it is correctly dumped.
Writing 100 times to a register per second is really nothing when you consider the CPU runs at 3.5 mhz.. but of course you knew that :)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Re: My reader header
Post Posted: Tue Mar 20, 2001 11:03 pm
Quote
> There's no problem with Cosmic Spacehead, it is correctly dumped.
> Writing 100 times to a register per second is really nothing when you consider the CPU runs at 3.5 mhz.. but of course you knew that :)

OK. Hmm, does that mean Meka 0.57 will perfectly emulate Cosmic Spacehead (and Micro Machines, and the various Dizzy games...)? I hope so...

3.5 mHz? Millihertz? That means it does 1 CPU cycle every 4 minutes 46 seconds or so, making it slightly faster than an overclocked NES, probably. That or Zoop meant megahertz...

(Don't worry, this passes for humour in some culturally deprived areas, mainly where you get too many scientific types close together.)

Maxim
  View user's profile Send private message Visit poster's website
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Re: My reader header
Post Posted: Wed Mar 21, 2001 7:08 am
Quote
>> There's no problem with Cosmic Spacehead, it is correctly dumped.
>> Writing 100 times to a register per second is really nothing when you consider the CPU runs at 3.5 mhz.. but of course you knew that :)
> OK. Hmm, does that mean Meka 0.57 will perfectly emulate Cosmic Spacehead (and Micro Machines, and the various Dizzy games...)? I hope so...

If I have time to fixes all bugs, probably. Haven't touched Meka since several weeks.

Yeah yeah.. millihertz.. :)
  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!