6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Oct 03, 2024 7:23 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Mar 02, 2017 4:12 pm 
Offline
User avatar

Joined: Thu Jun 23, 2011 2:12 am
Posts: 229
Location: Rancho Cucamonga, California
BigEd wrote:
Interesting detail Jac! We had another case to worry about: a write to a peripheral using an indexed addressing mode (as you are using a 'C02 you're fine.) In our case, interfacing with the Beeb's NMOS 6502, this case means we can get two consecutive accesses, and it's the second one which is important. So, after a read access, we have a quick look to see if chip select is still active. This cost a bit of performance when we were doing the bit-banging in the ISR.


I suppose if it would be necessary to check for two consecutive accesses to the same address range, it would probably be possible to do an extra address check in the second clock cycle and postpone the internal house keeping by one more cycle. In the case of the Apple 1 PIA emulator on the Propeller, it wasn't necessary.

There's just one flaw in the PIA emulator in L-Star currently: the reset circuit can't be emulated because the Propeller isn't connected to that line (there aren't enough I/O pins), so it can't reliably determine whether the CPU is accessing the direction register or data register. Because of this, you always see a character 255 on the output when WOZ Mon initializes the port for output. I could work around this by trying to detect a reset sequence (the 65c02 reads 3 decreasing addresses on the stack, followed by a read of FFFC/FFFD) but it's not that important. For now, I just pretend that the control register and the direction registers don't exist.

===Jac


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: GoRobbert 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: