Buffering data bus

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Feuerwerk42
Posts: 17
Joined: Fri Mar 18, 2016 3:59 am

Buffering data bus

Post by Feuerwerk42 » Mon Jul 18, 2016 8:28 am

Hi everybody

My logic level converter board is complete and im able to connect a gamepak with my FPGAnes.
Currently im figuring out how to control the address and data buses to get the rom data into my CPU.
I observed that the CPU databus only has a value while /ROMSEL is low (and CPU_RW is high of course)
, whereas i'm used to have a value read from memory for the whole duration of the next cycle inside of
my FPGA. I don't think this is a problem to me, just adding a flip flop which updates permanently with
the databus value while /ROMSEL is low but i wonder how the real CPU (and PPU) is doing this job.
Has the CPU/PPU something similar or do i simply miss something?

Chris

tepples
Posts: 21883
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Buffering data bus

Post by tepples » Mon Jul 18, 2016 9:45 am

Hold time is the time during which a digital circuit's inputs need to remain stable on the bus for the circuit to recognize them properly. Normally, you want to make hold time short to make life easier for the designers of the rest of the circuit. This requires latching the value from the data bus just as M2 is about to fall.

For the sort of hold time expected of memories connected to a 6502 processor, see the MOS 6502 datasheet.

Feuerwerk42
Posts: 17
Joined: Fri Mar 18, 2016 3:59 am

Re: Buffering data bus

Post by Feuerwerk42 » Sun Jul 24, 2016 2:05 am

Hi

Ok, than my approch is quite identical. But latching the Data on the falling edge of M2?
The requested ROM-data is only available during M2 is low.

Chris

lidnariq
Posts: 9131
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Buffering data bus

Post by lidnariq » Sun Jul 24, 2016 11:40 am

It's a transparent latch, latching continuously while M2 is high.
This seems equivalent to a register latching on M2's falling edge, though.

Feuerwerk42
Posts: 17
Joined: Fri Mar 18, 2016 3:59 am

Re: Buffering data bus

Post by Feuerwerk42 » Sun Jul 24, 2016 12:12 pm

Damn, /ROMSEL is M2 nand A15, so yes, on falling edge of M2. I mixed it up :-/

@lidnariq yes, thats the way i have to do it

Post Reply