Skip to content

Commit

Permalink
fixed loader
Browse files Browse the repository at this point in the history
  • Loading branch information
raydac committed Apr 6, 2022
1 parent 76e038b commit 257f993
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
bin/
*.syso
versioninfo.go
/adapted/ZxWord/target/lst.lst
25 changes: 13 additions & 12 deletions AsmLoader/zxpoly.i
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Macroses for ZX-Poly platform
;
; Format: Sjasmplus
; Version: 1.01
; Version: 1.02
; Author: Igor Maznitsa


Expand Down Expand Up @@ -355,17 +355,18 @@ CPU3_R3 EQU $33FF
; addr - the start address of the memorey block
; length - the length of the memory block
MACRO COPY2CPU cpu, addr, length
; set disNMI for the ZX-Poly R1 of target CPU
LD IX,COPY_CPU0_R1
LD A,(IX+0)
OR $30
LD BC,CPU0_R1
OUT (C),A
LD (IX+0),A

LD BC,CPU0_R1+cpu
OUT (C),A
LD (IX+cpu),A
; disable NMI for target CPU because it will be mass generated during write
LD A,[COPY_CPU0_R1 + (cpu << 2)]
OR #30
LD BC, CPU0_R1 | (cpu << 12)
OUT (C),A
LD [COPY_CPU0_R1 + (cpu * 4)], A

LD A,[COPY_CPU0_R1]
OR #30
LD BC, CPU0_R1
OUT (C),A
LD [COPY_CPU0_R1], A

LD A,(COPY_3D00)
AND ~$60
Expand Down
Binary file modified adapted/Atw2/target/atw2.trd
Binary file not shown.
27 changes: 14 additions & 13 deletions adapted/Atw2/zxpoly.mac
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,18 @@ COPY_CPU3_R3 DEFB 0
; addr - the start address of the memorey block
; length - the length of the memory block
MACRO COPY2CPU cpu, addr, length
; set disNMI for the ZX-Poly R1 of target CPU
LD IX,COPY_CPU0_R1
LD A,(IX+0)
OR #30
LD BC,CPU0_R1
OUT (C),A
LD (IX+0),A

LD BC,CPU0_R1+cpu
OUT (C),A
LD (IX+cpu),A
; disable NMI for target CPU because it will be mass generated during write
LD A,[COPY_CPU0_R1 + (cpu << 2)]
OR #30
LD BC, CPU0_R1 | (cpu << 12)
OUT (C),A
LD [COPY_CPU0_R1 + (cpu * 4)], A

LD A,[COPY_CPU0_R1]
OR #30
LD BC, CPU0_R1
OUT (C),A
LD [COPY_CPU0_R1], A

LD A,(COPY_3D00)
AND ~#60
Expand Down Expand Up @@ -406,10 +407,10 @@ COPY_CPU3_R3 DEFB 0
LD BC,ZXPOLY_MAIN
OUT (C),A

LD A,(IX+0)
LD A,(COPY_CPU0_R1)
RES 5,A
RES 4,A
LD (IX+0),A
LD (COPY_CPU0_R1),A
LD BC,CPU0_R1
OUT (C),A
ENDM
Expand Down
Binary file modified adapted/ZxWord/target/zxword.trd
Binary file not shown.
27 changes: 14 additions & 13 deletions adapted/ZxWord/zxpoly.mac
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,18 @@ COPY_CPU3_R3 DEFB 0
; addr - the start address of the memorey block
; length - the length of the memory block
MACRO COPY2CPU cpu, addr, length
; set disNMI for the ZX-Poly R1 of target CPU
LD IX,COPY_CPU0_R1
LD A,(IX+0)
OR #30
LD BC,CPU0_R1
OUT (C),A
LD (IX+0),A

LD BC,CPU0_R1+cpu
OUT (C),A
LD (IX+cpu),A
; disable NMI for target CPU because it will be mass generated during write
LD A,[COPY_CPU0_R1 + (cpu << 2)]
OR #30
LD BC, CPU0_R1 | (cpu << 12)
OUT (C),A
LD [COPY_CPU0_R1 + (cpu * 4)], A

LD A,[COPY_CPU0_R1]
OR #30
LD BC, CPU0_R1
OUT (C),A
LD [COPY_CPU0_R1], A

LD A,(COPY_3D00)
AND ~#60
Expand Down Expand Up @@ -406,10 +407,10 @@ COPY_CPU3_R3 DEFB 0
LD BC,ZXPOLY_MAIN
OUT (C),A

LD A,(IX+0)
LD A,(COPY_CPU0_R1)
RES 5,A
RES 4,A
LD (IX+0),A
LD (COPY_CPU0_R1),A
LD BC,CPU0_R1
OUT (C),A
ENDM
Expand Down

0 comments on commit 257f993

Please sign in to comment.