|
Joined: Aug 2009
Posts: 1,281 Likes: 215
Very Senior Member
|
Very Senior Member
Joined: Aug 2009
Posts: 1,281 Likes: 215 |
Not sure if this test program is meaningful... ![[Linked Image from img193.imageshack.us]](http://img193.imageshack.us/img193/8545/snesb.png) I can expect that most of them fails their test, but the CG RAM failing is quite bogus...?
|
|
|
|
Joined: May 2009
Posts: 2,223 Likes: 387
Very Senior Member
|
Very Senior Member
Joined: May 2009
Posts: 2,223 Likes: 387 |
Well, I only looked at the SNES-side Super Game Boy BIOS code. It looked for the #$f1, and then it looked at bytes 2-16 of each packet and compared it against a copy it stored inside the BIOS itself. The other values can be anything and it still works. Makes sense, it's probably an arbitrary value just so that the SNES-side program knows that the data was sent successfully.  That you've figured out the exact details from RE'ing the 256-byte GB-side BIOS is quite amazing, thank you. I had to fake the packets being sent on reset to start the SGB program, but it would probably be better to emulate the boot ROM and have it do that for us. I'm on a roll due to another GB side project I've got, it was pretty straightforward. I'm kind of disappointed that it didn't provide any insight into either what's sent to $6001 or $7800, though. 
|
|
|
|
Joined: May 2009
Posts: 2,223 Likes: 387
Very Senior Member
|
Very Senior Member
Joined: May 2009
Posts: 2,223 Likes: 387 |
Hey byuu, you mentioned that you largely took Gambatte's code piecemeal to try to get SGB games working. Could this have anything to do with the issues you were seeing? http://speeddemosarchive.com/kb/Super_Game_Boy_timingEdit: Oh, hey, the proper values are already listed on... *shudder*... overclocked.org: Clock Speed: 4.194304 MHz (4.295454 MHz for Super GB) Horiz Sync: 9198 KHz (9420 KHz for Super GB) Vert Sync: 59.73 Hz (61.17 Hz for Super GB)
|
|
|
|
Joined: Jun 2008
Posts: 205
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 205 |
The clock ratio for the Super Game Boy is just the main S-CPU rate, 21.477272MHz, divided by five. It shouldn't matter a whole lot there.
The main transmission protocol is a really, really slow serial thing over the joypad ports. But to send large amounts of data, eg for custom borders, it turns the screen off, then puts a lot of graphics into video RAM, sends a special command and the SGB BIOS uses the next frame's VRAM data for whatever the command was for.
The problem is that $7800 is a streaming auto-increment port, and those commands seem arbitrary and show up whenever. There's never a command-write that says "sync $7800 so the next read starts at offset 0." I think it may be related to the very unusual writes to $6001, but nothing I tried worked. So what kept happening was these commands would read out their own data and end up reading it from the wrong spot, resulting in gibberish custom data, and then the screen video output would get thrown off and the top of the screen would be moved a few lines, kind of like a lousy V-hold or something.
Anyway, on my WIP forum, Fras posted v045 wip09. That one has Super Game Boy support with sound. You should be able to see what I mean from it. The version of gambatte included has a couple of patches to expose the LY-counter, and to load and save to memory instead of disk.
Also, I tried e-mailing Costis to see if he'd be interested in looking into the two registers, but his lack of response seems to indicate he would not. Ah well, worth a try anyway.
|
|
|
|
Joined: Apr 2004
Posts: 1,563 Likes: 12
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,563 Likes: 12 |
Did you also try linking $7800 and the turning on of the gb video hardware? (I suppose you did though)
|
|
|
|
Joined: Jun 2008
Posts: 205
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 205 |
I don't think that was one of the things I tried, no. I didn't do anything to coordinate $7800 with GB-level events, as I don't really know anything about the GB hardware.
|
|
|
|
Joined: Apr 2004
Posts: 1,563 Likes: 12
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,563 Likes: 12 |
The gb video rendering hardware can be turned off. This allows full access to the gb video ram and is usually used to upload new tile sets for instance. When the gb video rendering hardware is active then during rendering the gb video ram is not accessible from time to time.
|
|
|
|
Joined: Jul 2009
Posts: 30
Member
|
Member
Joined: Jul 2009
Posts: 30 |
Regressions in svn 5824:
-Super Mario World has no sound. -Rock 'n' Roll Racing resets when entering a race -Many other games don't even start
What happened?
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
Regressions in svn 5824:
-Super Mario World has no sound. -Rock 'n' Roll Racing resets when entering a race -Many other games don't even start
What happened? It seems something wrong. Just check the game : The Legend of Zelda - A Link to the Past
|
|
|
|
Joined: Jul 2009
Posts: 30
Member
|
Member
Joined: Jul 2009
Posts: 30 |
What's wrong with Zelda? I can't see no error in it.
Last edited by guigongas; 09/21/09 04:59 PM.
|
|
|
1 members (Heihachi_73),
111
guests, and
4
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,354
Posts122,409
Members5,082
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|