cleanup shared mem code

This commit is contained in:
optixx
2009-09-20 09:38:56 +02:00
committed by Jannis (jix) Harder
parent 9c4c880b0b
commit b9425b1da5
6 changed files with 21 additions and 10 deletions

View File

@@ -239,8 +239,13 @@ void shared_memory_write(uint8_t cmd, uint8_t value)
SHARED_MEM_TX_LOC_CMD, cmd, SHARED_MEM_TX_LOC_PAYLOAD, value);
sram_bulk_addr_save();
#if (DO_SHM_SCRATCHPAD==0)
shared_memory_scratchpad_tx_save();
#endif
#if SHARED_MEM_SWITCH_IRQ
shared_memory_irq_hook();
#endif
sram_write(SHARED_MEM_TX_LOC_STATE, SHARED_MEM_TX_SNES_ACK);
sram_write(SHARED_MEM_TX_LOC_CMD, cmd);
@@ -266,8 +271,12 @@ void shared_memory_write(uint8_t cmd, uint8_t value)
snes_lorom();
snes_wr_disable();
#if (DO_SHM_SCRATCHPAD==0)
shared_memory_scratchpad_tx_restore();
#endif
#if SHARED_MEM_SWITCH_IRQ
shared_memory_irq_restore();
#endif
sram_bulk_addr_restore();
#endif
}