and.w #511,d0
cmp.w #258,d0
bne .wait1
-.wait2:
- move.l 4(a6),d0
- lsr.l #8,d0
- and.w #511,d0
- bne .wait2
move.w #0x1234,0xfc0004
| restore possible side-effect causing
| custom bits as late as possible
+
move.l CIAA_CHUNK(a4),(sp)
clr.l 4(sp)
bsr _set_cia_final
beq .nocpu68010
move.w #0x0020,-(sp) | Format 0, Trap #0
.nocpu68010:
+
+ move.l CIAA_CHUNK(a4),a1
+ move.b 15(a1),d6
+ swap d6
+ move.b 14(a1),d6
+ move.l CIAB_CHUNK(a4),a1
+ move.b 15(a1),d7
+ swap d7
+ move.b 14(a1),d7
+
move.l 4+4+60(a0),-(sp) | PC
move.w 4+4+60+4+2+2+4+4(a0),-(sp) | SR
- movem.l 4+4(a0),d0-d7/a0-a6
-
+ movem.l 4+4(a0),d0-d5
+ movem.l 4+4+8*4+4+4(a0),a2-a6
+
move.w #0x1234,0xfc0000
+
+ lea 0xbfde00,a1
+
+ | wait line 0
+.wait2:
+ tst.b 0xdff005
+ bne .wait2
+
+ | start timers
+ move.b d6,0xbfee01-0xbfde00(a1)
+ swap d6
+ move.b d6,0xbfef01-0xbfde00(a1)
+ move.b d7,(a1)
+ swap d7
+ move.b d7,0x100(a1)
+
+ movem.l 4+4+6*4(a0),d6-d7/a0-a1
rte | GO! GO! GO!
/* Real hardware UAE state file loader */
/* Copyright 2019 Toni Wilen */
-#define VER "0.4"
+#define VER "0.5"
#include <stdio.h>
#include <stdarg.h>
"ZCRM", "PRAM",
"A3K1", "A3K2",
"BORO", "P96 ",
- "FSYS",
+ "FSYC",
NULL
};
case 0x3c:
case 0x3e:
case 0x58:
+ case 0x5a:
case 0x5e:
case 0x68:
case 0x6a:
cia->ciaicr = 0x7f;
c->intreq = 0x7fff;
+ p[14] &= ~CIACRAF_LOAD;
+ p[15] &= ~CIACRAF_LOAD;
+
UBYTE flags = p[16 + 1 + 2 * 2 + 3 + 3];
cia->ciapra = p[0];
{
volatile struct CIA *cia = (volatile struct CIA*)(num ? 0xbfd000 : 0xbfe001);
UBYTE dummy = cia->ciaicr;
- cia->ciacra = p[14] & ~CIACRAF_LOAD;
- cia->ciacrb = p[15] & ~CIACRBF_LOAD;
cia->ciaicr = p[16] | CIAICRF_SETCLR;
}
WaitTOF();
}
+ OwnBlitter();
+ WaitBlit();
+
// No turning back!
extern void *killsystem(UBYTE*, struct uaestate*, ULONG);
killsystem(tempsp + TEMP_STACK_SIZE, tempst, (ULONG)processstate - (ULONG)module + (ULONG)newcode);