Skip to content

Commit

Permalink
fix: use callm instead of pmove to to identify M68020
Browse files Browse the repository at this point in the history
  • Loading branch information
kg68k committed Jul 9, 2022
1 parent a985e0a commit 9ae7886
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
30 changes: 23 additions & 7 deletions src/si.s
Original file line number Diff line number Diff line change
Expand Up @@ -4421,12 +4421,15 @@ sw_f_mpu:
* ccr <tst.l d0> の結果

get_mpu_type:
move.l a0,-(sp)
PUSH a0-a1
lea (callm_entry,pc),a0
move.l a0,(callm_ptr-callm_entry,a0)

PUSH_SR_DI
move.l (ILLEGAL_VEC*4),-(sp)
lea (sp),a0
pea (get_mpu_type_end,pc)
move.l (sp),(ILLEGAL_VEC*4)
lea (get_mpu_type_end,pc),a1
move.l a1,(ILLEGAL_VEC*4)

moveq #0,d0
.cpu 68010
Expand All @@ -4444,20 +4447,33 @@ get_mpu_type:
.cpu 68030
movec caar,d0

moveq #2,d0
pmove tt0,(sp)

moveq #3,d0
lea (callm_desc,pc),a1
.cpu 68020
callm #0,(a1)

moveq #2,d0
get_mpu_type_end:
.cpu 68000
lea (a0),sp
move.l (sp)+,(ILLEGAL_VEC*4)
POP_SR
movea.l (sp)+,a0
POP a0-a1
tst.l d0
rts


.cpu 68020
callm_desc:
.dc.l 0 ;OPT|TYPE|ACCESS LEVEL|RESETVED
callm_ptr: .dc.l 0 ;module entry word pointer
.dc.l 0,0 ;module data area pointer
callm_entry:
.dc %1111_0000_0000_0000 ;module entry word
rtm sp
.cpu 68000


*┌────────────────────────────────────────┐
*│ -f-mmu │
*└────────────────────────────────────────┘
Expand Down
4 changes: 2 additions & 2 deletions src/si_ver.mac
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SIEE_VERSION: .reg '4.01'
SIEE_DATE: .reg '2022-03-20'
SIEE_VERSION: .reg '4.02'
SIEE_DATE: .reg '2022-07-09'

0 comments on commit 9ae7886

Please sign in to comment.