mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-21 09:49:01 +00:00
Implementation - behaves different when resetting (via B) and with/without the free ROM. But it doesn't freeze.
This commit is contained in:
parent
b0ab32164b
commit
3487da39f1
2 changed files with 72 additions and 4 deletions
|
@ -455,8 +455,8 @@ void handle_dsp_mail(void)
|
||||||
{
|
{
|
||||||
real_dsp.SetInterrupt(false);
|
real_dsp.SetInterrupt(false);
|
||||||
real_dsp.SendMailTo(real_dsp.CheckInterrupt() ? 0x99995372 : 0x99995370);
|
real_dsp.SendMailTo(real_dsp.CheckInterrupt() ? 0x99995372 : 0x99995370);
|
||||||
while (real_dsp.CheckMailTo())
|
//while (real_dsp.CheckMailTo())
|
||||||
;
|
// ;
|
||||||
}
|
}
|
||||||
else if (mail == 0x88885372)
|
else if (mail == 0x88885372)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,19 +1,87 @@
|
||||||
|
; This test needs to manually specify IRQs
|
||||||
|
jmp irq0
|
||||||
|
jmp irq1
|
||||||
|
jmp irq2
|
||||||
|
jmp irq3
|
||||||
|
jmp irq4
|
||||||
|
jmp irq5
|
||||||
|
jmp irq6
|
||||||
|
jmp external_irq
|
||||||
|
|
||||||
incdir "tests"
|
incdir "tests"
|
||||||
include "dsp_base.inc"
|
include "dsp_base_noirq.inc"
|
||||||
|
|
||||||
test_main:
|
test_main:
|
||||||
CLR $ACC0
|
CLR $ACC0
|
||||||
CLR $ACC1
|
CLR $ACC1
|
||||||
|
|
||||||
|
;SBCLR #2
|
||||||
|
;SBCLR #3
|
||||||
|
;SBCLR #4
|
||||||
|
;SBCLR #5
|
||||||
|
;SBCLR #6
|
||||||
|
|
||||||
|
; We store a copy of $SR in $AR0.
|
||||||
|
;MRR $AR0, $SR
|
||||||
|
; $IX0 is set to SR_100, so we can add it to $AR0 repeatedly to cycle through $SR bits.
|
||||||
|
;LRI $IX0, #0x0100
|
||||||
|
; Subtract $IX0 from $AR0, so that we can add it the first time to get $SR
|
||||||
|
; (and have $AR0 always match $SR instead of overflowing)
|
||||||
|
;SUBARN $AR0
|
||||||
|
|
||||||
LRIS $AX0.H, #1
|
LRIS $AX0.H, #1
|
||||||
CALL send_back
|
CALL send_back
|
||||||
|
|
||||||
|
; We're checking 5 bits in $sr, so 1 << 5 or 0x20 times.
|
||||||
|
;BLOOPI #0x20, main_loop_last_ins
|
||||||
|
CLR $ACC0
|
||||||
|
ADDARN $AR0, $IX0
|
||||||
|
MRR $SR, $AR0
|
||||||
|
|
||||||
|
; Tell the CPU to set the external interrupt
|
||||||
|
SI @DMBH, #0x8888
|
||||||
|
SI @DMBL, #0x5372
|
||||||
|
SI @DIRQ, #0x0001
|
||||||
|
|
||||||
|
; Wait for CPU
|
||||||
|
wait_cpu_read_1a:
|
||||||
|
LRS $AC1.M, @DMBH
|
||||||
|
ANDCF $AC1.M, #0x8000
|
||||||
|
JLZ wait_cpu_read_1a
|
||||||
|
wait_cpu_read_1b:
|
||||||
|
LRS $AC1.M, @CMBH
|
||||||
|
ANDCF $AC1.M, #0x8000
|
||||||
|
JLZ wait_cpu_read_1b
|
||||||
|
|
||||||
|
LRIS $AX0.H, #2
|
||||||
|
;CALL send_back
|
||||||
|
|
||||||
|
; Tell the CPU to un-set the external interrupt
|
||||||
|
SI @DMBH, #0x8888
|
||||||
|
SI @DMBL, #0x5370
|
||||||
|
SI @DIRQ, #0x0001
|
||||||
|
|
||||||
|
wait_cpu_read_2a:
|
||||||
|
LRS $AC1.M, @DMBH
|
||||||
|
ANDCF $AC1.M, #0x8000
|
||||||
|
JLZ wait_cpu_read_2a
|
||||||
|
wait_cpu_read_2b:
|
||||||
|
LRS $AC1.M, @CMBH
|
||||||
|
ANDCF $AC1.M, #0x8000
|
||||||
|
JLZ wait_cpu_read_2b
|
||||||
|
|
||||||
|
LRIS $AX0.H, #3
|
||||||
|
;CALL send_back
|
||||||
|
|
||||||
|
NOP
|
||||||
|
main_loop_last_ins:
|
||||||
|
NOP
|
||||||
|
|
||||||
JMP end_of_test
|
JMP end_of_test
|
||||||
|
|
||||||
external_irq:
|
external_irq:
|
||||||
INC $ACC0
|
INC $ACC0
|
||||||
; LRIS $AX0.H, #3
|
; LRIS $AX0.H, #4
|
||||||
; CALL send_back
|
; CALL send_back
|
||||||
RTI
|
RTI
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue