PAR_SW is the on/off switch on the board and PSX_STB is a signal that's asserted when there is data to read on the comms link.
--
-- 0x1F000000 - 0x1F01FFFF First half of flash ROM (R/W)
-- 0x1F020010 Returns STB bit in D0 (data available) (R)
-- 0x1F020018 Returns status of switch in PSX_DATA(0) (R)
-- 0x1F040000 - 0x1F05FFFF Second half of flash ROM (R/W)
-- 0x1F060000 Read incoming data byte (R)
-- 0x1F060008 Write response byte (W)
--
-- Access to Flash ROM - note that CS/ is tied to ground on the PCB
FLASH_A17 <= PSX_A18;
FLASH_OE <= NOT (NOT PSX_CS and NOT PSX_RD and NOT PSX_A17);
FLASH_WR <= NOT (NOT PSX_CS and NOT PSX_WR0 and NOT PSX_A17);
-- Other read accesses
PSX_DATA(0) <= PAR_SW when (NOT PSX_CS AND NOT PSX_RD AND PSX_A17 AND not PSX_A18 and PSX_A4 and PSX_A3) = '1' else 'Z'; -- Switch
PSX_DATA(0) <= PSX_STB when (NOT PSX_CS AND NOT PSX_RD AND PSX_A17 AND not PSX_A18 and PSX_A4 and NOT PSX_A3) = '1' else 'Z'; -- STB bit
PSX_DATA <= psx_indata when (NOT PSX_CS AND NOT PSX_RD AND PSX_A17 and PSX_A18 AND NOT PSX_A4 and NOT PSX_A3) = '1' else "ZZZZZZZZ"; -- Data port
-- Decode the link register write condition
psx_wdata <= (NOT PSX_CS AND NOT PSX_WR0 AND PSX_A17 and PSX_A18 and NOT PSX_A4 and PSX_A3);
Just in case you're interested, here is a little video - sorry for using Youku, but uploading stuff to youtube is a pain in China because you have to use a VPN, and it was really slow today...
http://v.youku.com/v_show/id_XNTk3OTc5OTY4.html
