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 - VRAM test program

Reply to topic
Author Message
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
VRAM test program
Post Posted: Thu Mar 22, 2001 5:25 pm

I wrote a program to test a few things about VRAM access, that could be specific to the GG rather than the SMS.

If somebody here could run it on a real SMS and Game Gear, I'd be very grateful.

http://cgfm2.emuviews.com/demo/vramtest.zip

If it works, three values will be printed to the screen. All I need to know is what the values are.

The ROM is 32K, checksummed, and hopefully SDSC-compliant. :)


  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
SDSC header blues
Post Posted: Thu Mar 22, 2001 8:46 pm
Quote
> The ROM is 32K, checksummed, and hopefully SDSC-compliant. :)

Your year comes out as 20 00, which will resolve as 20 AD. The text offsets are misaligned by a byte. That causes my header reader to try and seek to FF05 and read beyond EOF :o(

Looking at your .asm source, it looks like it ought to work, though. Maybe if you had ".db $22,$04,$01,$20 ; Date" it'd work? (My asm is sketchy at best.)

Maxim
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: SDSC header blues
Post Posted: Thu Mar 22, 2001 9:05 pm
Quote
> > The ROM is 32K, checksummed, and hopefully SDSC-compliant. :)

> Your year comes out as 20 00, which will resolve as 20 AD. The text offsets are misaligned by a byte. That causes my header reader to try and seek to FF05 and read beyond EOF :o(

> Looking at your .asm source, it looks like it ought to work, though. Maybe if you had ".db $22,$04,$01,$20 ; Date" it'd work? (My asm is sketchy at best.)

Yes, you've got it.

With ".db $22,$04,$0120 ; Date", TASM will mask off the high byte of $0120 so it just assembles as $22,$04,$20. And so the rest of the header is off by one byte.
  View user's profile Send private message Visit poster's website
  • Joined: 18 Sep 1999
  • Posts: 498
  • Location: Portland, Oregon USA
Reply with quote
Re: SDSC header blues
Post Posted: Thu Mar 22, 2001 9:12 pm
Quote
> > The ROM is 32K, checksummed, and hopefully SDSC-compliant. :)

> Your year comes out as 20 00, which will resolve as 20 AD. The text offsets are misaligned by a byte. That causes my header reader to try and seek to FF05 and read beyond EOF :o(

> Looking at your .asm source, it looks like it ought to work, though. Maybe if you had ".db $22,$04,$01,$20 ; Date" it'd work? (My asm is sketchy at best.)

Yes, that seems to be it. In the asm file the .db statment is given $22,$04,$0120, and it is simply truncating the word-value $0120 to $20. Consequently, a byte is missing and the remaining fields are off by one.

The fix Maxim suggests above will resolve the problem. Also, just a tiny little note to Charles, the month should be 3 (March) not 4 (April).

--
Eric Quinn
  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: SDSC header blues
Post Posted: Thu Mar 22, 2001 9:27 pm
Quote
> The fix Maxim suggests above will resolve the problem. Also, just a tiny little note to Charles, the month should be 3 (March) not 4 (April).

Yes, I just noticed that. Anyway, I've updated my header reader to handle the problem a bit more gracefully.

Maxim
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 742
  • Location: Adelaide, Australia
Reply with quote
Re: SDSC header twitches
Post Posted: Fri Mar 23, 2001 3:24 am
ROM Offset 0x7FE8 (2 Bytes): Year (BCD) (Little-endian: 0x01 0x20 for 2001)

little-endian?!?

sms/zilog is big-endian, motorola is little endian.

I would hence like to propose the following motto for SDSC hereafter:

SDSC. taking standard out of standard development

he he he
a s out.
  View user's profile Send private message
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: SDSC header twitches
Post Posted: Fri Mar 23, 2001 3:38 am
Quote
> ROM Offset 0x7FE8 (2 Bytes): Year (BCD) (Little-endian: 0x01 0x20 for 2001)
>
> little-endian?!?

> sms/zilog is big-endian, motorola is little endian.

You've got it backwards: Little Endian means "Little End First". (from Gulliver's Travels, the "Little Endians" cracked their eggs at the little end, the "Big Endians" cracked their eggs at the big end. No I never read it myself).

And the z80 in the SMS is little endian.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 742
  • Location: Adelaide, Australia
Reply with quote
Re: SDSC header twitches
Post Posted: Fri Mar 23, 2001 5:42 am
Quote
> > ROM Offset 0x7FE8 (2 Bytes): Year (BCD) (Little-endian: 0x01 0x20 for 2001)
> >
> > little-endian?!?

> > sms/zilog is big-endian, motorola is little endian.

> You've got it backwards: Little Endian means "Little End First". (from Gulliver's Travels, the "Little Endians" cracked their eggs at the little end, the "Big Endians" cracked their eggs at the big end. No I never read it myself).

> And the z80 in the SMS is little endian.

I was refering more to the inconsistency with sega $7FF0 header - the rest was off the top of my head and mixed.

So you like to read books huh? =oP

a s out.

  View user's profile Send private message
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Fixed test program
Post Posted: Fri Mar 23, 2001 6:32 am

Thanks to Maxim and Eric, I've got the SDSC header fixed.

And most importantly, I changed the text output so it can actually be seen on a Game Gear as well. Funny how these small details escape one's mind. :)

The updated program is here:

http://cgfm2.emuviews.com/demo/vramtest.zip

Hopefully this will work.


  View user's profile Send private message Visit poster's website
  • Joined: 18 Sep 1999
  • Posts: 498
  • Location: Portland, Oregon USA
Reply with quote
Re: SDSC header twitches
Post Posted: Sun Mar 25, 2001 7:06 pm
Quote
> ROM Offset 0x7FE8 (2 Bytes): Year (BCD) (Little-endian: 0x01 0x20 for 2001)
>
> little-endian?!?

> sms/zilog is big-endian, motorola is little endian.

> I would hence like to propose the following motto for SDSC hereafter:

> SDSC. taking standard out of standard development

1.) The Z80 and SMS are little-endian. Please get your facts straight (especially before insulting me personally, and SDSC in general).

2.) Because of this, I (the SDSC tag format drafter) thought it would be better for the SDSC tag to use little-endian format, (and not big-endian which is not the native data storage format for SMS/GG machines), regardless of what the original SMS/GG header did (which the SDSC has no control over).

3.) The proposal was open for revisions for several weeks. If you had a suggestion you should have spoken up earlier. The tag format has been ratified.


--
Eric Quinn
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Hmmm
Post Posted: Mon Mar 26, 2001 5:24 am
What is this program actually testing? read/write commands? Has anyone tested it and supplied you with any info that is helpful? :)
-Jason Starr-
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: Hmmm
Post Posted: Mon Mar 26, 2001 4:18 pm
Quote
> What is this program actually testing? read/write commands? Has anyone tested it and supplied you with any info that is helpful? :)
> -Jason Starr-

It tests a (possible) difference in doing VRAM writes with bit 15 set of the command word between the Game Gear and SMS.

The only known game to do this is Ax Battler (GG), but it only uses it for a specific address range. The test program tries other addresses which may or may not be valid.

Nobody has tested it yet - but then again no one is obligated to do so. :)


  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!