Skip to content

Commit

Permalink
feat (emulator): support PhantomX with WINPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
kg68k committed Feb 9, 2024
1 parent a27d141 commit 7ee3cb7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 変更履歴

## 4.09 (2024-02-09)

* PhantomX装着時はWINPORTが有効でもエミュレータと見なさないようにした。
2 changes: 1 addition & 1 deletion si.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
│ Copyright (C)1997 Arisugawa Seara │
│ │
│ System Information Extended Edition │
│ Copyright (C)1999-2022 TcbnErik │
│ Copyright (C)1999-2024 TcbnErik │
└─────────────────────────────────────┘


Expand Down
11 changes: 7 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SRCS = si.s si_util.s si_emu.s si_model.s si_acc.s si_phantomx.s si_memory.s si_
OBJS = $(SRCS:.s=.o)
SI_R = si.r
SI_X = si.x
SI_TXT = si.txt
DOCS = si.txt changelog.txt

SI_ZIP = siee.zip

Expand All @@ -33,11 +33,14 @@ all: $(SI_R)

archive: $(SI_ZIP)

$(SI_ZIP): $(SI_R) $(SI_TXT)
$(SI_ZIP): $(SI_R) $(DOCS)
rm -f $@
zip -9 $@ $^

$(SI_TXT): $(SRC_DIR)/../si.txt
si.txt: $(SRC_DIR)/../si.txt
$(U8TOSJ) < $^ >! $@

changelog.txt: $(SRC_DIR)/../CHANGELOG.md
$(U8TOSJ) < $^ >! $@


Expand All @@ -58,6 +61,6 @@ install:
cp $(SI_TXT) $(MANDIR)

clean:
rm -f si.[xr] $(OBJS) $(ARCS)
rm -f $(SI_ZIP) $(DOCS) $(SI_R) $(SI_X) $(OBJS)

# EOF
12 changes: 10 additions & 2 deletions src/si_emu.s
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SYSPORT_E8E00D_P7: .equ $e8e00d

WINPORT_E9F000: .equ $e9f000
XEIJ_E9F03C_HFS_MAGIC: .equ $e9f03c
PHANTOMX_EA8000_REG: .equ $ea8000

MU_ECC091_COMMAND: .equ $ecc091

Expand Down Expand Up @@ -57,10 +58,15 @@ Emulator_GetType::
beq 8f
@@:

;PhantomXでWINPORTが有効なケースを考慮し、先に調べる
lea (PHANTOMX_EA8000_REG),a0
bsr DosBusErrWord
beq 1f ;PhantomXなので実機

;WINPORTが読めればエミュ確定
lea (WINPORT_E9F000),a0
bsr DosBusErrByte
beq 1f
beq 2f

;$e8e000.bが%0000_xxxxならX68000 Z(xxxxはコントラスト、実機は$ff)
moveq #EMULATOR_X68Z,d1
Expand All @@ -69,9 +75,10 @@ Emulator_GetType::
beq 8f

;実機
1:
moveq #EMULATOR_REAL,d1
bra 8f
1:
2:
;EX68
moveq #EMULATOR_EX68,d1
tst.b (SYSPORT_E8E00B_P6)
Expand Down Expand Up @@ -245,6 +252,7 @@ versionToString:


DEFINE_DOSBUSERRBYTE DosBusErrByte
DEFINE_DOSBUSERRWORD DosBusErrWord
DEFINE_DOSBUSERRLONG DosBusErrLong


Expand Down
2 changes: 1 addition & 1 deletion src/si_ver.mac
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SIEE_VERSION: .reg '4.08'
SIEE_VERSION: .reg '4.09'
SIEE_DATE: .reg '2024-02-09'

0 comments on commit 7ee3cb7

Please sign in to comment.