It is currently Sun Jan 21, 2018 7:58 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu May 25, 2017 7:56 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5985
Location: Canada
I was looking at Akumajou Densetsu earlier and I noticed that after every write to the sound registers at 8000-8002 / 9000-9002 / A000-A002, it follows up with an immediate jsr to a NOP routine that ends up burning 32 cycles.

I didn't see anything equivalent in Madara or Esper Dream 2, but they both seem to have more than that delay between writes just by some actual functional code in between.

I've seen homebrew NSFs play fine on hardware (e.g. TNS devices) that have shorter periods between writes (Famitracker seems to go about 14 cycles between?) and haven't spotted a problem with them.

I'm just curious if there's really supposed to be a "speed limit" on VRC6 writes like there is on VRC7. At least with the VRC7 I know why, but seeing intentional delays like this in AD makes me wonder if it has any real write speed problems, or maybe at some early point in the design such a problem was presumed? Anyhow, just kind of strange, really, I might try and do some write speed tests later on when I get back to working on NSFPlay.


Top
 Profile  
 
PostPosted: Thu May 25, 2017 8:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6643
Location: Seattle
Other than the OPL series, the only sound IC I know of that requires an incomprehensibly long delay between writes also is the SN76489...


Top
 Profile  
 
PostPosted: Fri May 26, 2017 12:03 am 
Offline

Joined: Thu Aug 20, 2015 3:09 am
Posts: 305
Maybe they were planning to use a Yamaha chip like they did later, but changed it late in development? I could see some poor programmer in crunch mode not realizing the JSRs didn't do anything useful.


Top
 Profile  
 
PostPosted: Fri May 26, 2017 10:39 am 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1319
lidnariq wrote:
Other than the OPL series, the only sound IC I know of that requires an incomprehensibly long delay between writes also is the SN76489...

When using the SN76489 derivative in the Megadrive VDP, I didn't include any delays when writing to multiple registers, but it seemed fine. Is this a problem with the standalone chip only?


Top
 Profile  
 
PostPosted: Fri May 26, 2017 11:43 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6643
Location: Seattle
I can't really do anything more than quote the datasheet?
The SN76494 and SN76494A require approximately 4 clock cycles to load the data into the control register. The SN76496 and SN76496A require approximately 32 clock cycles. The open-collector READY output is used to synchronize the microprocessor to this transfer and is pulled to the false state (low) immediately following the falling edge of C̅E̅ (or W̅E̅ when data transfer is initiated by W̅E̅). READY will go high upon completion of the data transfer cycle.
(emphasis mine, just to ease comprehension)

The 76494 has a maximum clock of 500kHz and the SN76496 has a maximum clock of 4MHz: the only difference is the latter has a global divide-by-8 on its clock input.

This requirement is that the data bus be stable for the whole time; while this design clearly intended to stall the CPU during a write, an external latch also works.

This delay is pretty incomprehensible to me. I don't see, even given late 1970s technology, why latching the values takes more than a single cycle.


Top
 Profile  
 
PostPosted: Sun May 28, 2017 6:09 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7350
Location: Chexbres, VD, Switzerland
rainwarrior wrote:
I'm just curious if there's really supposed to be a "speed limit" on VRC6 writes like there is on VRC7. At least with the VRC7 I know why, but seeing intentional delays like this in AD makes me wonder if it has any real write speed problems, or maybe at some early point in the design such a problem was presumed? Anyhow, just kind of strange, really, I might try and do some write speed tests later on when I get back to working on NSFPlay.

Really, the only way to know is write a test ROM or something, maybe something that can be used with hotswapping, so that it doesn't require the damagement of a working VRC6 cartridge.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 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