It is currently Mon Oct 23, 2017 7:17 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Mon Jan 19, 2009 1:21 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
On the tests, instructions E8 and F8 fail in both VBA and Goomba Color. What is the correct behavior for those instructions?

Edit: This indeed is for the GB-Z80, not the Z80.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Last edited by Dwedit on Mon Jan 19, 2009 2:03 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 1:59 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
E8 is RET if parity is even, F8 is RET if minus flag is set. Perhaps they're not setting the parity and minus flags properly.

Mods: please split this non-GB-Z80 CPU discussion off.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 2:31 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
bumping thread due to an edited post

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 4:02 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Oh, GB-Z80. Those are:

E8 ADD SP,+$00
F8 LD HL,SP+$00

Both of these set carry and half-carry based on the low byte of SP added to the UNSIGNED immediate byte. The Negative and Zero flags are always cleared. They also calculate SP + SIGNED immediate byte and put the result into SP or HL, respectively.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 5:10 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
Thanks, fixed those instructions in Goomba Color.

Now I just get "Failed 06" in the 01.custom test program.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 7:23 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Looking at source/01.custom.a, I see that is for DAA. So you haven't yet implemented the DAA flag handling I outlined earlier?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2009 12:14 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
Fixed DAA, got everything working except for Timing, which would be because the TIMER isn't emulated correctly.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2009 2:32 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
The weird thing is that now that I've fixed the instruction timings according to pandocs, test 2 (the timing test) never finishes. It even stops generating timer overflows after a while.
If I just change the timing of "ADD HL,rp" to something other than 8 cycles the test will finish (but it obviously fails all those instructions).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2009 3:33 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
For whatever reason, I had set the length of "SBC (HL)" to 2 bytes, so everything went bananas after that.. Now all that's left are a few subtests of tests 6, 7, 8 and 10 (I think my H-flag calculation for SBC might be incorrect, which is causing a few of those errors).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2009 9:10 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
I've made a number of improvements to the CPU tests:

cpu_instrs.zip
instr_timing.zip
mem_timing.zip

- Split instruction timing from CPU behavior tests
- cpu_instrs now tests all instructions except STOP
- instr_timing now tests all instructions except HALT and STOP
- Added new memory access timing tests that test which cycle reads and writes occur (except stack and PC accesses)
- Improved documentation and added summary of how each test works
- Included source has been tested to assemble on its own with wla
- All ROMs also print output to the game link port, and will work even with no LCD support (rather than hanging)

Please note that while I've tested the underying code on the DMG and CGB, I can't test the exact ROMs included since my devcart doesn't have rewritable ROM. Internally I still copy the test code to internal RAM at $D000 before running it there, as my devcart does, so there's very little difference. Even so, having someone test these with a flash cartridge would be appreciated.

Thanks for trying and giving feedback on previous versions of these!

EDIT: fixed ROM header checksums so they work on hardware, and moved to file host that's working.


Last edited by blargg on Sat Jun 12, 2010 8:55 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2009 9:16 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
Even so, having someone test these with a flash cartridge would be appreciated.

I might be able to do that next week sometime, unless someone else comes through.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 07, 2009 4:52 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Here are my results (from a CGB):

cpu_instrs: Doesn't run
instr_timing: passes
mem_timing: Doesn't run

By "Doesn't run" I mean that the GAME BOY logo is displayed and the beep is played, then nothing happens. It just continues to show the GAME BOY logo. Maybe something went wrong when I programmed my flash cart, I dunno..


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 07, 2009 9:32 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Thanks for testing; I found the problem to be an incorrect checksum in the header. I re-uploaded the fixed files (to a new host).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 07, 2009 12:11 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
They now pass all tests.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 12, 2010 8:08 pm 
Offline

Joined: Sat Jun 12, 2010 8:05 pm
Posts: 14
Any chance of a mirror download to these test ROMs?

all the links seem broken.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group