Top Gear 3000
Moderator: ZSNES Mods
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I did a lot of debugging to see why is it screwing up.
I think the problem is somewhere in ZSNES' CPU core, since ZSNES is trying to access the DSP-4 when it shouldn't be. Or at least ZSNES is trying to access it at a time when Snes9x which I compared to doesn't.
I think the problem is somewhere in ZSNES' CPU core, since ZSNES is trying to access the DSP-4 when it shouldn't be. Or at least ZSNES is trying to access it at a time when Snes9x which I compared to doesn't.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Rookie
- Posts: 12
- Joined: Sun Sep 05, 2004 1:06 am
(CVS files, not WIP 02-24-05)
dsp4emu.c
(uninitialised variable after label resume6)
- line 1178: bool8 draw;
- line 1232: draw = TRUE;
(I've never understood why the nybbles get flipped during emulation but not with the real binary data)
(Either way, will temporarily fix the AI issue)
- line 2241: uncomment line
- line 2242: comment out line
dsp4proc.asm
(add)
EXTSYM regaccessbankr16,regaccessbankr8
EXTSYM regaccessbankw16,regaccessbankw8
(Repeat for DSP4Read16b, DSP4Write8b, DSP4Write16b)Code: Select all
NEWSYM DSP4Read8b test ecx,8000h jnz .dsp4area jmp regaccessbankr8 .dsp4area (regular code)
As for the flicker, well... timing...? :/
It does run faster than the current snes9x one though.
Regardless, nice work Nach.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Thanks for the info, I thought I had to do something with the normal registry accesses, but I wasn't sure.
I also would not have noticed the problem with draw.
The two versions with Op 0A however, I've been playing with since I wasn't sure which had to be used.
As for speed, I bet I can get it even faster if I integrate DSP4GetByte/DSP4SetByte into the assembly better and clean up the DSP-4 core a bit.
For the flickering, odds are, I messed up something when porting it to C, as I have the same problem when I threw my C core into Snes9x. I'll have to look things over.
I also would not have noticed the problem with draw.
The two versions with Op 0A however, I've been playing with since I wasn't sure which had to be used.
As for speed, I bet I can get it even faster if I integrate DSP4GetByte/DSP4SetByte into the assembly better and clean up the DSP-4 core a bit.
For the flickering, odds are, I messed up something when porting it to C, as I have the same problem when I threw my C core into Snes9x. I'll have to look things over.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Rookie
- Posts: 12
- Joined: Sun Sep 05, 2004 1:06 am
(quote) Looking at the crazy inputs to OP01 and putting an "int 3" on GetByte flushed out the WRAM read to the DSP-4.Nach wrote:Thanks for the info, I thought I had to do something with the normal registry accesses, but I wasn't sure.
(quote) When the sprites didn't show up in-race, I knew where to look fast. ;)Nach wrote:I also would not have noticed the problem with draw.
(quote) The correct version is line 2242 but then the inputs appear to get nybble-flipped, from looking at normal logged inputs to OP0A.Nach wrote:The two versions with Op 0A however, I've been playing with since I wasn't sure which had to be used.
(quote) Ooh. Nice. :) It can be ungodly slow sometimes, especially with 1P-split.Nach wrote:As for speed, I bet I can get it even faster if I integrate DSP4GetByte/DSP4SetByte into the assembly better and clean up the DSP-4 core a bit.
(quote) Even the C++ code causes the same flicker with 9x. I remember once hearing (Overload?) that it was insane timing but my memory is foggy. It's supposed to render the track twice per frame and the WAI throws things off more. There's no chance I can fix anything that deep. I think Super Sleuth handles live data from the chip fine though. The forks in the road are really the ideal timing test cases.Nach wrote:For the flickering, odds are, I messed up something when porting it to C, as I have the same problem when I threw my C core into Snes9x. I'll have to look things over.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Well I realized it was doing something it wasn't with my debug core.Dreamer_Nom wrote:(quote) Looking at the crazy inputs to OP01 and putting an "int 3" on GetByte flushed out the WRAM read to the DSP-4.Nach wrote:Thanks for the info, I thought I had to do something with the normal registry accesses, but I wasn't sure.
Code: Select all
ZSNES:
Multiplier: 4294966272; Multiplicand: 192
DSP4Set Address: 32768; Byte: 76
DSP4Set Address: 32769; Byte: 0
DSP4Get Address: 32768; Byte: 253
DSP4Get Address: 32769; Byte: 255
DSP4Get Address: 180; Byte: 128
DSP4Get Address: 181; Byte: 128
DSP4Get Address: 549; Byte: 128
DSP4Get Address: 550; Byte: 128
DSP4Get Address: 550; Byte: 128
DSP4Get Address: 551; Byte: 128
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 0
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 0
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 252
DSP4 Command: 0
Multiplier: 0; Multiplicand: 4294966272
Snes9x:
Multiplier: 4294966272; Multiplicand: 192
DSP4Set Address: 32768; Byte: 76
DSP4Set Address: 32769; Byte: 0
DSP4Get Address: 32768; Byte: 253
DSP4Get Address: 32769; Byte: 255
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 0
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 239
DSP4Set Address: 32768; Byte: 0
DSP4Set Address: 32769; Byte: 252
DSP4 Command: 0
Multiplier: 4294962944; Multiplicand: 4294966272
Because there's this test too:
Code: Select all
if ((dsp4_address & 0xf000) == 0x6000 || (dsp4_address >= 0x8000 && dsp4_address < 0xc000))
Maybe it's just my imagination, but the C++ code has less flickering.Dreamer_Nom wrote:(quote) Even the C++ code causes the same flicker with 9x. I remember once hearing (Overload?) that it was insane timing but my memory is foggy. It's supposed to render the track twice per frame and the WAI throws things off more. There's no chance I can fix anything that deep. I think Super Sleuth handles live data from the chip fine though. The forks in the road are really the ideal timing test cases.Nach wrote:For the flickering, odds are, I messed up something when porting it to C, as I have the same problem when I threw my C core into Snes9x. I'll have to look things over.
Perhaps if we put some pauses into the core somewhere it won't flicker so much?
Current progress:




May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Rookie
- Posts: 12
- Joined: Sun Sep 05, 2004 1:06 am
(quote) Ahm.. Let me think. If we don't do the "test ecx,$8000", then DSP4Read16b will call DSP4GetByte. DSP4GetByte would return the SR = 0x80 instead of WRAM. I could easily be wrong though as I'm not technically inclined.Nach wrote:BTW is that test for 8000 correct?
Because there's this test too:Code: Select all
if ((dsp4_address & 0xf000) == 0x6000 || (dsp4_address >= 0x8000 && dsp4_address < 0xc000))
(quote) You could easily be right. I played around with it but no dice.Nach wrote:Maybe it's just my imagination, but the C++ code has less flickering.
Perhaps if we put some pauses into the core somewhere it won't flicker so much?
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I mean should this test be done instead of the test for 8000 in DSP4Read16b and DSP4Write16b, and then remove the test from DSP4Get/SetByte?Dreamer_Nom wrote:(quote) Ahm.. Let me think. If we don't do the "test ecx,$8000", then DSP4Read16b will call DSP4GetByte. DSP4GetByte would return the SR = 0x80 instead of WRAM. I could easily be wrong though as I'm not technically inclined.Nach wrote:BTW is that test for 8000 correct?
Because there's this test too:Code: Select all
if ((dsp4_address & 0xf000) == 0x6000 || (dsp4_address >= 0x8000 && dsp4_address < 0xc000))
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
And about this test:
Where did this come from?
I'm thinking more along the lines of:
Code: Select all
if ((dsp4_address & 0xf000) == 0x6000 || (dsp4_address >= 0x8000 && dsp4_address < 0xc000))
I'm thinking more along the lines of:
Code: Select all
if (((dsp4_address & 0xf000) == 0x6000) || ((dsp4_address & 0xc000) == 0x8000))
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Okay current code in CVS has a few more FPS eeked out of it.
I've also just had an idea to use setjmp()/longjmp() instead of this dsp4_logic goto stuff, although I'm not sure if that would work...
I've also just had an idea to use setjmp()/longjmp() instead of this dsp4_logic goto stuff, although I'm not sure if that would work...
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I found a bug not occuring in race, I would like some info on it, ZST:
http://nsrt.edgeemu.com/tg3ksave.zip

http://nsrt.edgeemu.com/tg3ksave.zip

May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Looks like a offset mode change bug, try turning off offset mode to see if that fixes the bug.Nach wrote:I found a bug not occuring in race, I would like some info on it, ZST:
http://nsrt.edgeemu.com/tg3ksave.zip
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Yeah it does
BTW, we have a similar bug in DKC3.

BTW, we have a similar bug in DKC3.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Yep it's official. ZSNES currently is the best emulator for Top Gear 3000.
Even anomie's major rewrite of Snes9x which fixes tons of bugs doesn't play Top Gear 3000 as well as ZSNES does right now. But that will probably change as anomie irons out his new code.
Anyways, screenshots:






Even anomie's major rewrite of Snes9x which fixes tons of bugs doesn't play Top Gear 3000 as well as ZSNES does right now. But that will probably change as anomie irons out his new code.
Anyways, screenshots:






May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
pagefault even fixed split screen mode:


Oh and I forgot to mention I'm getting full speed as long as I don't use HQ filtering


Oh and I forgot to mention I'm getting full speed as long as I don't use HQ filtering

May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Devil's Advocate
- Posts: 2293
- Joined: Mon Aug 02, 2004 7:51 pm
- Location: Hmo. Son.
Oh, how would I miss this... So long word filter "Top Gear 3000" ...crocomire wrote:FANTASTIC WORK!!!![]()
![]()
![]()
It's an old dream play asparagus which sucks because it lacks a pavement on the jet engine (read docs please) in ZSNES!
Thanks ZSNES Team!
/jk
Great work guys!
*Sometimes I edit my posts just to correct mistakes.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Nah, we'll leave in the filter in some form or another.
As taken from IRC:
<pagefault> ok code is backported
<pagefault> and I am no longer hitting trees
<pagefault> so as you can see my CPU core needs more work
<pagefault> this game sucks though Nach
<pagefault> it needs a gun on the hood
<Nach> yeah
<Nach> maybe we should steal some code from UOSNES to add a gun on the hood
As taken from IRC:
<pagefault> ok code is backported
<pagefault> and I am no longer hitting trees
<pagefault> so as you can see my CPU core needs more work
<pagefault> this game sucks though Nach
<pagefault> it needs a gun on the hood
<Nach> yeah
<Nach> maybe we should steal some code from UOSNES to add a gun on the hood
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
EDIT: Bah, forget this... I wasn't using the latest WIP -_-...
Last edited by adventure_of_link on Wed Mar 02, 2005 12:06 am, edited 1 time in total.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
AhahahhahahaNach wrote:Nah, we'll leave in the filter in some form or another.
As taken from IRC:
<pagefault> ok code is backported
<pagefault> and I am no longer hitting trees
<pagefault> so as you can see my CPU core needs more work
<pagefault> this game sucks though Nach
<pagefault> it needs a gun on the hood
<Nach> yeah
<Nach> maybe we should steal some code from UOSNES to add a gun on the hood
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact: