It is currently Fri Dec 15, 2017 10:31 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: NES APU Tests
PostPosted: Sat Feb 21, 2015 7:27 pm 
Online
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 751
Location: New York, NY
I encountered the following problem while running the APU Tests:

Code:
Channel: 2

Problem with length counter load or $4015

1-len_ctr

Fail #2


I think channel 2 refers to the triangle channel. Does anyone know more details about this error? My emulator's pulse channels seem to pass this test and the code looks very similar.


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 8:31 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
This is the source of the test:
Code:
   set_test 2,"Problem with length counter load or $4015"
   mov $4015,chan_bit      ; enable channel
   setb {$4003,x},len_2    ; load length
   jsr should_be_playing


It enables the channel via $4015, then loads the length counter via $4003. The channel should be playing.


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 9:40 am 
Online
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 751
Location: New York, NY
Zepper wrote:
It enables the channel via $4015, then loads the length counter via $4003. The channel should be playing.


I reviewed that code before the post and I still can't figure it out. The test seems to load the length counter with $4003 + 4 * x. I don't know how long it waits until the channel should start playing. I assume this is some sort of timing issue since games like Mega Man 2 don't sound so bad with my emulator.


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 10:19 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Check $4015 reads.


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 11:20 am 
Online
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 751
Location: New York, NY
Zepper wrote:
Check $4015 reads.


Yes! That was it. Thanks. I failed to include the triangle channel in the status read.


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 4:50 pm 
Online
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 751
Location: New York, NY
Can anyone give me a hint on this one?

Code:
There should be a one-byte
buffer that's filled
immediately if empty

7-dmc_basics

Failed #19


As far as I know, I'm filling the buffer :)


Top
 Profile  
 
 Post subject: Re: NES APU Tests
PostPosted: Sun Feb 22, 2015 7:15 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
There is an archive compiled of all the test ROMs and their relevant source code and documentation (if available), which should (hopefully?) help you answer some of the questions: https://github.com/christopherpow/nes-test-roms

For example, the APU test ROM you're using from blargg is here, and has documentation explaining things in detail: https://github.com/christopherpow/nes-t ... r/apu_test -- relevant code: https://github.com/christopherpow/nes-t ... ics.s#L169 -- and the relevant register name equates/aliases: https://github.com/christopherpow/nes-t ... /neshw.inc


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

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:  
cron
Powered by phpBB® Forum Software © phpBB Group