Re: [hatari-devel] new acia / ikbd emulation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On torstai 01 marraskuu 2012, Nicolas Pomarède wrote:
> Le 01/11/2012 12:28, Eero Tamminen a écrit :
> > Neither Fokker nor Downfall works with EmuTOS, they just freeze,
> > but I assume that just to be incompatibility with EmuTOS IKBD
> > handler.
>
> It's possible. But it's strange EmuTos is affected by this, the
> interrupt handler for ikbd/acia should be rather simple and just pass
> bytes to the calling program.
According to profiler, the game runs through 44 different addresses
and EmuTOS several hundred, while the game is stuck.
I added to profiler a new mode which will show addresses/instructions
that were used during profiling, in the address order (i.e. not sorted
by instruction/cycle count). Results are attached, I hope they tell
what's wrong.
Btw. File is unmodified Hatari profiler output, I think it's pretty nice.
I'll add it to Hatari after I've added some extra configurability to
the 68kDisass.c code, to be able to set the disassembler options and
set/disable output columns from elsewhere in Hatari (temporarily) or
from the Hatari configuration file (temporarily). That's why I haven't
had yet time to look at the asm output more yet. :-)
- Eero
Allocated CPU profile address buffer (3 KB).
Normal RAM (0-0x400000):
- active address range:
0x0331fe-0x03acc6
- active instruction addresses:
44 (15.77% of all)
- executed instructions:
112917959 (92.75% of all)
- used cycles:
1391269508 (91.98% of all)
Cartridge ROM (0xFA0000-0xFC0000):
- no activity
ROM TOS (0xE00000-0xE80000):
- active address range:
0xe0016e-0xe34c14
- active instruction addresses:
235 (84.23% of all)
- executed instructions:
8823111 (7.25% of all)
- used cycles:
121367500 (8.02% of all)
CPU=$33204, VBL=22295, FrameCycles=84, HBL=0, LineCycles=84, DSP=N/A
> profile addresses 333
$0331fe : btst #1,$fffffc00.w 52451196/423797504 times/cycles
$033204 : beq.s $331fe 52451195/842228272 times/cycles
$033206 : move.b #$16,$fffffc02.w 219625/1765808 times/cycles
$03320c : cmpi.w #$ff00,8(a0) 219625/3522400 times/cycles
$033212 : beq $331fe 219625/3519756 times/cycles
$033216 : cmpi.w #$ff00,$e(a0) 219625/2643908 times/cycles
$03321c : beq $331fe 219625/3519796 times/cycles
[...]
$034e1c : move.w #0,$ffff825e.w 16833/234672 times/cycles
$034e22 : move.l #$34d7e,$48a1a 16833/269368 times/cycles
$034e2c : clr.w $48a26 16833/470108 times/cycles
$034e32 : addq.w #1,$48a24 16833/336660 times/cycles
$034e38 : jmp (a6) 16833/336660 times/cycles
$034e3a : move.l a5,$0388.w 841647/11691828 times/cycles
$034e3e : movea.l $48a1a,a5 841647/13466352 times/cycles
$034e44 : move.w (a5)+,$ffff825e.w 841647/16832940 times/cycles
$034e48 : move.l a5,$48a1a 841647/13466352 times/cycles
$034e4e : movea.l $0388.w,a5 841647/16832940 times/cycles
$034e52 : rte 841647/13466352 times/cycles
$034e54 : move.l a5,$038c.w 54256/775424 times/cycles
$034e58 : movea.l $48a40,a5 54256/868096 times/cycles
$034e5e : cmpa.l #0,a5 54256/1085120 times/cycles
$034e64 : beq.s $34ec0 54256/759584 times/cycles
[...]
$034ec0 : movea.l $038c.w,a5 54256/434048 times/cycles
$034ec4 : rte 54256/868096 times/cycles
[...]
$03ac7e : move.l a3,$0384.w 72893/1166288 times/cycles
$03ac82 : movea.l #$4894e,a3 72893/1166288 times/cycles
$03ac88 : move.w d0,-(sp) 72893/874716 times/cycles
$03ac8a : clr.w d0 72893/583144 times/cycles
$03ac8c : move.b 1(a0),d0 72893/291572 times/cycles
$03ac90 : add.b d0,d0 72893/874716 times/cycles
$03ac92 : scs 8(a3) 72893/291572 times/cycles
$03ac96 : add.b d0,d0 72893/1166288 times/cycles
$03ac98 : move.w $3acc8(pc,d0.w),$a(a3) 72893/291572 times/cycles
$03ac9e : move.w $3acca(pc,d0.w),$c(a3) 72893/1603646 times/cycles
$03aca4 : move.b (a0),d0 72893/1603646 times/cycles
$03aca6 : add.b d0,d0 72893/583144 times/cycles
$03aca8 : scs $e(a3) 72893/291572 times/cycles
$03acac : add.b d0,d0 72893/1166288 times/cycles
$03acae : move.w $3acc8(pc,d0.w),$10(a3) 72893/291572 times/cycles
$03acb4 : move.w $3acca(pc,d0.w),$12(a3) 72893/1603646 times/cycles
$03acba : move.w (sp)+,d0 72893/1603646 times/cycles
$03acbc : movea.l $0384.w,a3 72893/583144 times/cycles
$03acc0 : movea.l #$4894e,a0 72893/1166288 times/cycles
$03acc6 : rts 72893/874716 times/cycles
[...]
$e0016e : movem.l d0-d3/a0-a3,-(sp) 219624/3578650 times/cycles
$e00172 : movea.l $11c4,a0 219624/1756992 times/cycles
$e00178 : jsr (a0) 219624/4392480 times/cycles
$e0017a : movea.l $11c8,a0 219624/3513984 times/cycles
$e00180 : jsr (a0) 219624/4392480 times/cycles
$e00182 : lea $fffa00,a1 219624/3513984 times/cycles
$e00188 : btst #4,1(a1) 219624/2635488 times/cycles
$e0018e : beq $e00172 219624/3513984 times/cycles
$e00192 : bclr #6,$11(a1) 219624/2635488 times/cycles
$e00198 : movem.l (sp)+,d0-d3/a0-a3 219624/4392480 times/cycles
$e0019c : rte 219624/2635488 times/cycles
$e0019e : move.b $fffc04,d0 219624/3513984 times/cycles
$e001a4 : bpl $e001b6 219624/3513984 times/cycles
[...]
$e001b6 : rts 219624/2635488 times/cycles
[...]
$e001f8 : moveq #0,d0 219624/3513984 times/cycles
$e001fa : move.b $fffc00,d1 219624/878496 times/cycles
$e00200 : move.b d1,d0 219624/3513984 times/cycles
$e00202 : bpl $e001f6 219624/878496 times/cycles
$e00206 : move.b $fffc02,d0 219624/2635488 times/cycles
$e0020c : tst.b $11cc 219624/3513984 times/cycles
$e00212 : bne $e0025e 219624/3513984 times/cycles
$e00216 : cmpi.w #$f6,d0 73208/878496 times/cycles
$e0021a : bcc $e00226 73208/585664 times/cycles
[...]
$e00226 : move.b d0,$11d0 73208/878496 times/cycles
$e0022c : move.w #1,$11ce 73208/1171328 times/cycles
$e00234 : subi.b #$f6,d0 73208/1464160 times/cycles
$e00238 : move.b $e0024a(pc,d0.l),$11cc 73208/585664 times/cycles
$e00240 : move.b $e00254(pc,d0.l),$11cd 73208/1903408 times/cycles
$e00248 : rts 73208/1903408 times/cycles
[...]
$e0025e : move.w $11ce,d1 146416/1756992 times/cycles
$e00264 : lea $11d0,a0 146416/2342656 times/cycles
$e0026a : move.b d0,(a0,d1.w) 146416/1756992 times/cycles
$e0026e : subq.b #1,$11cd 146416/2049824 times/cycles
$e00274 : beq $e00280 146416/2928320 times/cycles
$e00278 : addq.w #1,$11ce 73208/878496 times/cycles
$e0027e : rts 73208/1464160 times/cycles
$e00280 : moveq #0,d0 73208/878496 times/cycles
$e00282 : move.b $11cc,d0 73208/292832 times/cycles
$e00288 : asl.w #2,d0 73208/1171328 times/cycles
$e0028a : movea.l $e00292(pc,d0.l),a1 73208/292832 times/cycles
$e0028e : lea $11d0,a0 73208/1317744 times/cycles
$e00294 : jmp (a1) 73208/878496 times/cycles
[...]
$e002c0 : movea.l $11b8,a1 315/2520 times/cycles
$e002c6 : bra $e0030c 315/6300 times/cycles
[...]
$e002d6 : lea $11d8,a1 72893/583144 times/cycles
$e002dc : move.b (a0)+,(a1)+ 72893/874716 times/cycles
$e002de : move.b (a0)+,(a1)+ 72893/874716 times/cycles
$e002e0 : move.b (a0),(a1) 72893/874716 times/cycles
$e002e2 : subq.l #2,a1 72893/874716 times/cycles
$e002e4 : bra $e00304 72893/583144 times/cycles
[...]
$e00304 : movea.l a1,a0 72893/874716 times/cycles
$e00306 : movea.l $11c0,a1 72893/291572 times/cycles
$e0030c : move.l a0,-(sp) 73208/1461640 times/cycles
$e0030e : jsr (a1) 73208/878496 times/cycles
$e00310 : addq.l #4,sp 73208/1171328 times/cycles
$e00312 : clr.b $11cc 73208/585664 times/cycles
$e00318 : rts 73208/1464160 times/cycles
[...]
$e00460 : addq.l #1,$466 16833/134736 times/cycles
$e00466 : subq.w #1,$452 16833/470836 times/cycles
$e0046c : bmi $e00524 16833/336660 times/cycles
$e00470 : movem.l d0-d7/a0-a6,-(sp) 16833/202036 times/cycles
$e00474 : addq.l #1,$462 16833/135828 times/cycles
$e0047a : jsr $e0debe 16833/469460 times/cycles
$e00480 : move.l $45a,d0 16833/269424 times/cycles
$e00486 : beq $e004be 16833/336660 times/cycles
[...]
$e004be : move.l $45e,d0 16833/202036 times/cycles
$e004c4 : beq $e004ee 16833/336660 times/cycles
[...]
$e004ee : jsr $e075a2 16833/202020 times/cycles
$e004f4 : move.w $454,d0 16833/269460 times/cycles
$e004fa : beq $e00520 16833/269420 times/cycles
$e004fe : subq.w #1,d0 16833/202276 times/cycles
$e00500 : movea.l $456,a0 16833/67348 times/cycles
$e00506 : movea.l (a0)+,a1 134664/1752264 times/cycles
$e00508 : cmpa.l #0,a1 134664/1617224 times/cycles
$e0050e : beq $e0051c 134664/1886544 times/cycles
$e00512 : movem.l d0/a0,-(sp) 16833/202148 times/cycles
$e00516 : jsr (a1) 16833/135360 times/cycles
$e00518 : movem.l (sp)+,d0/a0 16833/269400 times/cycles
$e0051c : dbra d0,$e00506 134664/1617808 times/cycles
$e00520 : movem.l (sp)+,d0-d7/a0-a6 16833/202148 times/cycles
$e00524 : addq.w #1,$452 16833/202700 times/cycles
$e0052a : rte 16833/336660 times/cycles
[...]
$e014e0 : lea $1346,a0 570/10260 times/cycles
$e014e6 : tst.w d0 570/6840 times/cycles
$e014e8 : bge $e014f2 570/2280 times/cycles
[...]
$e014f2 : cmp.w (a0),d0 570/6840 times/cycles
$e014f4 : ble $e014fa 570/4560 times/cycles
[...]
$e014fa : tst.w d1 570/6840 times/cycles
$e014fc : bge $e01504 570/2280 times/cycles
$e01500 : clr.w d1 1/12 times/cycles
$e01502 : rts 1/4 times/cycles
$e01504 : cmp.w 2(a0),d1 569/6828 times/cycles
$e01508 : ble $e01510 569/6828 times/cycles
[...]
$e01510 : rts 569/6828 times/cycles
$e01512 : tst.b $14a7 315/5040 times/cycles
$e01518 : bne $e015da 315/5040 times/cycles
$e0151c : movem.l d0-d7/a0-a6,-(sp) 315/3780 times/cycles
$e01520 : move.b (a0),d0 315/2520 times/cycles
$e01522 : move.b d0,d1 315/2520 times/cycles
$e01524 : andi.b #$f8,d1 315/1260 times/cycles
$e01528 : cmpi.b #$f8,d1 315/2520 times/cycles
$e0152c : bne $e015d6 315/2520 times/cycles
$e01530 : andi.w #3,d0 315/3780 times/cycles
$e01534 : lsr.b #1,d0 315/2520 times/cycles
$e01536 : bcc $e0153e 315/1260 times/cycles
$e0153a : bset #1,d0 12/144 times/cycles
$e0153e : move.b $149e,d1 315/3780 times/cycles
$e01544 : andi.w #3,d1 315/5040 times/cycles
$e01548 : cmp.b d1,d0 315/2520 times/cycles
$e0154a : beq $e01576 315/1260 times/cycles
$e0154e : lea $13a6,a1 31/372 times/cycles
$e01554 : move.w (a1),d2 31/372 times/cycles
$e01556 : andi.w #$fffc,d2 31/248 times/cycles
$e0155a : or.w d2,d0 31/248 times/cycles
$e0155c : move.w d0,(a1) 31/124 times/cycles
$e0155e : move.w d1,-(sp) 31/248 times/cycles
$e01560 : movea.l $15c0,a1 31/248 times/cycles
$e01566 : jsr (a1) 31/620 times/cycles
$e01568 : move.w (sp)+,d1 31/496 times/cycles
$e0156a : eor.b d0,d1 31/248 times/cycles
$e0156c : ror.b #2,d1 31/124 times/cycles
$e0156e : or.b d1,d0 31/124 times/cycles
$e01570 : move.b d0,$149e 31/124 times/cycles
$e01576 : move.b 1(a0),d0 315/3904 times/cycles
$e0157a : or.b 2(a0),d0 315/3780 times/cycles
$e0157e : bne $e0158e 315/3780 times/cycles
$e01582 : bclr #5,$149e 30/360 times/cycles
$e0158a : bra $e015d6 30/720 times/cycles
$e0158e : bset #5,$149e 285/3420 times/cycles
$e01596 : move.w $13a0,d0 285/6840 times/cycles
$e0159c : move.b 1(a0),d1 285/4560 times/cycles
$e015a0 : ext.w d1 285/3420 times/cycles
$e015a2 : add.w d1,d0 285/1140 times/cycles
$e015a4 : move.w $13a2,d1 285/1140 times/cycles
$e015aa : move.b 2(a0),d3 285/4560 times/cycles
$e015ae : ext.w d3 285/3420 times/cycles
$e015b0 : add.w d3,d1 285/1140 times/cycles
$e015b2 : bsr $e014e0 285/1140 times/cycles
$e015b6 : movea.l $15c8,a1 285/4560 times/cycles
$e015bc : jsr (a1) 285/5700 times/cycles
$e015be : bsr $e014e0 285/4560 times/cycles
$e015c2 : move.w d0,$13a0 285/4560 times/cycles
$e015c8 : move.w d1,$13a2 285/4560 times/cycles
$e015ce : movea.l $15c4,a1 285/4560 times/cycles
$e015d4 : jsr (a1) 285/5700 times/cycles
$e015d6 : movem.l (sp)+,d0-d7/a0-a6 315/4920 times/cycles
$e015da : rts 315/3780 times/cycles
[...]
$e0163a : tst.w $13a4 285/4560 times/cycles
$e01640 : bne $e01660 285/4560 times/cycles
[...]
$e01660 : rts 285/3420 times/cycles
[...]
$e030ee : move.l sp,$44f6 31/496 times/cycles
$e030f4 : lea $458a,sp 31/620 times/cycles
$e030fa : movem.l d0-d2/a0-a2,-(sp) 31/372 times/cycles
$e030fe : move.w d0,-(sp) 31/248 times/cycles
$e03100 : jsr $e34ba6 31/248 times/cycles
$e03106 : addq.l #2,sp 31/496 times/cycles
$e03108 : movem.l (sp)+,d0-d2/a0-a2 31/248 times/cycles
$e0310c : movea.l $44f6,sp 31/372 times/cycles
$e03112 : rts 31/620 times/cycles
$e03114 : move.l sp,$44f6 285/4560 times/cycles
$e0311a : lea $458a,sp 285/5700 times/cycles
$e03120 : movem.l d0-d2/a0-a2,-(sp) 285/3420 times/cycles
$e03124 : move.w d1,-(sp) 285/2280 times/cycles
$e03126 : move.w d0,-(sp) 285/2280 times/cycles
$e03128 : move.l #$e34e7c,-(sp) 285/2280 times/cycles
$e0312e : jsr $e303e8 285/5700 times/cycles
$e03134 : addq.l #8,sp 285/4560 times/cycles
$e03136 : movem.l (sp)+,d0-d2/a0-a2 285/2280 times/cycles
$e0313a : movea.l $44f6,sp 285/3420 times/cycles
$e03140 : rts 285/5700 times/cycles
[...]
$e075a2 : move.l a2,-(sp) 16833/336660 times/cycles
$e075a4 : move.l d2,-(sp) 16833/202060 times/cycles
$e075a6 : move.w $43e,d0 16833/202276 times/cycles
$e075ac : bne.s $e07606 16833/269404 times/cycles
$e075ae : move.l $466,d0 16833/134928 times/cycles
$e075b4 : moveq #7,d1 16833/336660 times/cycles
$e075b6 : and.l d1,d0 16833/67332 times/cycles
$e075b8 : bne.s $e07606 16833/134760 times/cycles
$e075ba : tst.b $6a72 2104/16892 times/cycles
$e075c0 : bne.s $e07606 2104/33692 times/cycles
[...]
$e07606 : move.l (sp)+,d2 16833/135120 times/cycles
$e07608 : movea.l (sp)+,a2 16833/202172 times/cycles
$e0760a : rts 16833/202204 times/cycles
[...]
$e0debe : move.l d2,-(sp) 16833/336660 times/cycles
$e0dec0 : move.b $15f4,d0 16833/202020 times/cycles
$e0dec6 : move.b d0,d1 16833/269468 times/cycles
$e0dec8 : ext.w d1 16833/67620 times/cycles
$e0deca : move d1,ccr 16833/67348 times/cycles
$e0decc : bne.s $e0df18 16833/202324 times/cycles
[...]
$e0df18 : move.l (sp)+,d2 16833/134868 times/cycles
$e0df1a : rts 16833/202196 times/cycles
[...]
$e2d894 : move sr,d0 16833/269348 times/cycles
$e2d896 : move #$2700,sr 16833/101544 times/cycles
$e2d89a : tst.b $14a6 16833/269328 times/cycles
$e2d8a0 : beq.s $e2d8d6 16833/269328 times/cycles
[...]
$e2d8d6 : move sr,d1 16833/134664 times/cycles
$e2d8d8 : move d0,sr 16833/100998 times/cycles
$e2d8da : rts 16833/203212 times/cycles
[...]
$e303e8 : move.w $24d94,d0 316/6320 times/cycles
$e303ee : bne.s $e303fe 316/5056 times/cycles
[...]
$e303fe : cmpi.w #$1f,d0 316/2528 times/cycles
$e30402 : bgt.s $e30440 316/2528 times/cycles
$e30404 : movea.w $1fbb8,a1 7/56 times/cycles
$e3040a : move.w a1,d1 7/112 times/cycles
$e3040c : ext.l d1 7/28 times/cycles
$e3040e : lsl.l #3,d1 7/28 times/cycles
$e30410 : movea.l d1,a0 7/28 times/cycles
$e30412 : adda.l #$20e70,a0 7/28 times/cycles
$e30418 : move.w a1,d1 7/112 times/cycles
$e3041a : addq.w #1,d1 7/28 times/cycles
$e3041c : move.w d1,$1fbb8 7/28 times/cycles
$e30422 : cmpi.w #$20,d1 7/112 times/cycles
$e30426 : bne.s $e3042e 7/56 times/cycles
$e30428 : clr.w $1fbb8 1/8 times/cycles
$e3042e : move.l 4(sp),(a0) 7/68 times/cycles
$e30432 : move.l 8(sp),4(a0) 7/168 times/cycles
$e30438 : addq.w #1,d0 7/196 times/cycles
$e3043a : move.w d0,$24d94 7/28 times/cycles
$e30440 : rts 316/2584 times/cycles
[...]
$e34ba6 : move.l d2,-(sp) 31/620 times/cycles
$e34ba8 : move.w 8(sp),d2 31/372 times/cycles
$e34bac : cmp.w $24e82,d2 31/372 times/cycles
$e34bb2 : beq.s $e34c12 31/496 times/cycles
$e34bb4 : move.w $24e9c,d0 31/248 times/cycles
$e34bba : beq.s $e34bd4 31/496 times/cycles
[...]
$e34bd4 : tst.w $24e8a 31/248 times/cycles
$e34bda : beq.s $e34bfa 31/496 times/cycles
[...]
$e34bfa : move.w #1,-(sp) 31/248 times/cycles
$e34bfe : move.w d2,-(sp) 31/372 times/cycles
$e34c00 : pea $e34f40(pc) 31/248 times/cycles
$e34c04 : jsr $e303e8 31/496 times/cycles
$e34c0a : addq.l #8,sp 31/496 times/cycles
$e34c0c : move.w d2,$24e82 31/248 times/cycles
$e34c12 : move.l (sp)+,d2 31/496 times/cycles
$e34c14 : rts 31/372 times/cycles
Disassembled 279 (of active 279) CPU addresses.