TODO: Make this be called by IopHw.cpp / psxHwReset()... but maybe it should be called by the EE reset func, given that the PGIF is in the EE ASIC, on the other side of the SBUS.
| 115 | //TODO: Make this be called by IopHw.cpp / psxHwReset()... but maybe it should be called by the EE reset func, |
| 116 | //given that the PGIF is in the EE ASIC, on the other side of the SBUS. |
| 117 | void pgifInit() |
| 118 | { |
| 119 | rb_gp1.buf = pgif_gp1_buffer; |
| 120 | rb_gp1.size = PGIF_CMD_RB_SIZE; |
| 121 | ringBufferClear(&rb_gp1); |
| 122 | |
| 123 | rb_gp0.buf = pgif_gp0_buffer; |
| 124 | rb_gp0.size = PGIF_DAT_RB_SIZE; |
| 125 | ringBufferClear(&rb_gp0); |
| 126 | |
| 127 | pgpu.stat.write(0); |
| 128 | pgif.ctrl.write(0); |
| 129 | old_gp0_value = 0; |
| 130 | |
| 131 | |
| 132 | dmaRegs.madr.address = 0; |
| 133 | dmaRegs.bcr.write(0); |
| 134 | dmaRegs.chcr.write(0); |
| 135 | //pgpuDmaTadr = 0; |
| 136 | |
| 137 | dma.state.ll_active = 0; |
| 138 | dma.state.to_gpu_active = 0; |
| 139 | dma.state.to_iop_active = 0; |
| 140 | |
| 141 | dma.ll_dma.data_read_address = 0; |
| 142 | dma.ll_dma.current_word = 0; |
| 143 | dma.ll_dma.total_words = 0; |
| 144 | dma.ll_dma.next_address = 0; |
| 145 | |
| 146 | dma.normal.total_words = 0; |
| 147 | dma.normal.current_word = 0; |
| 148 | dma.normal.address = 0; |
| 149 | } |
| 150 | |
| 151 | //Interrupt-related (IOP, EE and DMA): |
| 152 |
no test coverage detected