back references fixed
This commit is contained in:
parent
dca9690219
commit
dff96990fc
|
|
@ -1,5 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
bas2tap -a10 -spsgplay loader.bas loader.tap
|
bas2tap -a10 -spsgplay loader.bas loader.tap
|
||||||
sjasmplus main.asm --lst=main.lst
|
sjasmplus main.asm --lst=main.lst
|
||||||
copy /b loader.tap+player.tap "moebius.tap"
|
copy /b loader.tap+player.tap+page0.tap+page1.tap+page3.tap+page4.tap+page6.tap+page7.tap "moebius.tap"
|
||||||
pause
|
pause
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
10 BORDER 0 : PAPER 7 : INK 7 : CLEAR 24575
|
10 BORDER 0 : PAPER 7 : INK 7 : CLEAR 24575
|
||||||
20 LOAD "moebius" CODE
|
20 LOAD "moebius" CODE
|
||||||
|
30 POKE 23388,16 : OUT 32765,16 : LOAD "page0" CODE
|
||||||
|
40 POKE 23388,17 : OUT 32765,17 : LOAD "page1" CODE
|
||||||
|
50 POKE 23388,19 : OUT 32765,19 : LOAD "page3" CODE
|
||||||
|
60 POKE 23388,20 : OUT 32765,20 : LOAD "page4" CODE
|
||||||
|
70 POKE 23388,22 : OUT 32765,22 : LOAD "page6" CODE
|
||||||
|
80 POKE 23388,23 : OUT 32765,23 : LOAD "page7" CODE
|
||||||
100 RANDOMIZE USR 33155
|
100 RANDOMIZE USR 33155
|
||||||
|
|
@ -211,9 +211,23 @@ music_p0_ch15:
|
||||||
page 4
|
page 4
|
||||||
emptytap "page4.tap"
|
emptytap "page4.tap"
|
||||||
org 0xC000
|
org 0xC000
|
||||||
|
db 0
|
||||||
savetap "page4.tap",CODE,"page4",0xC000,$-0xC000
|
savetap "page4.tap",CODE,"page4",0xC000,$-0xC000
|
||||||
|
|
||||||
|
; ------------------------------------------------
|
||||||
|
page 6
|
||||||
|
emptytap "page6.tap"
|
||||||
|
org 0xC000
|
||||||
|
db 0
|
||||||
|
savetap "page6.tap",CODE,"page6",0xC000,$-0xC000
|
||||||
|
|
||||||
|
; ------------------------------------------------
|
||||||
|
page 7
|
||||||
|
emptytap "page7.tap"
|
||||||
|
org 0xC000
|
||||||
|
db 0
|
||||||
|
savetap "page7.tap",CODE,"page7",0xC000,$-0xC000
|
||||||
|
|
||||||
; splash screen
|
; splash screen
|
||||||
emptytap "splash.tap"
|
emptytap "splash.tap"
|
||||||
org 0x4000
|
org 0x4000
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,11 @@ reg_out:
|
||||||
; ------------------------
|
; ------------------------
|
||||||
; pop from stack
|
; pop from stack
|
||||||
; in: IX - channel context
|
; in: IX - channel context
|
||||||
; trashes A, DE
|
; trashes A, DE, HL
|
||||||
pop_stack:
|
pop_stack:
|
||||||
dec [ix + channel_struct_t.stack_pos] ; --chctx->stack_pos;
|
dec [ix + channel_struct_t.stack_pos] ; --chctx->stack_pos;
|
||||||
ld l, [ix + channel_struct_t.stack_pos] : ld h, 0 ; hl = chctx->stack_pos;
|
ld a, [ix + channel_struct_t.stack_pos]
|
||||||
add hl, hl ; *= 2
|
add a : add a : add channel_struct_t.stack : ld l, a : ld h, 0
|
||||||
add hl, hl ; *= 4
|
|
||||||
ld de, channel_struct_t.stack
|
|
||||||
add hl, de
|
|
||||||
ld de, ix
|
ld de, ix
|
||||||
add hl, de ; hl = st = chctx->stack + chctx->stack_pos;
|
add hl, de ; hl = st = chctx->stack + chctx->stack_pos;
|
||||||
|
|
||||||
|
|
@ -115,11 +112,8 @@ pop_stack:
|
||||||
; in: IX - channel context
|
; in: IX - channel context
|
||||||
; trashes A, DE
|
; trashes A, DE
|
||||||
push_stack:
|
push_stack:
|
||||||
ld l, [ix + channel_struct_t.stack_pos] : ld h, 0 ; hl = chctx->stack_pos;
|
ld a, [ix + channel_struct_t.stack_pos]
|
||||||
add hl, hl ; *= 2
|
add a : add a : add channel_struct_t.stack : ld l, a : ld h, 0
|
||||||
add hl, hl ; *= 4
|
|
||||||
ld de, channel_struct_t.stack
|
|
||||||
add hl, de
|
|
||||||
ld de, ix
|
ld de, ix
|
||||||
add hl, de ; hl = st = chctx->stack + chctx->stack_pos;
|
add hl, de ; hl = st = chctx->stack + chctx->stack_pos;
|
||||||
|
|
||||||
|
|
@ -686,15 +680,16 @@ parse_stream:
|
||||||
|
|
||||||
; back reference, nested call :)
|
; back reference, nested call :)
|
||||||
; int distance = ((*(data + 0) & 0x0F) << 8) | (*(data + 1));
|
; int distance = ((*(data + 0) & 0x0F) << 8) | (*(data + 1));
|
||||||
|
push hl
|
||||||
ld a, b : and 0x0F : ld d, a : inc hl
|
ld a, b : and 0x0F : ld d, a : inc hl
|
||||||
ldi e, [hl] ; de = distance
|
ldi e, [hl] ; de = distance
|
||||||
ldi a, [hl] ; int frames_to_play = *(data + 2); data += 3
|
ldi a, [hl] ; int frames_to_play = *(data + 2); data += 3
|
||||||
ld [ix + channel_struct_t.ptr], hl ; chctx->stream.ptr = data + 3;
|
ld [ix + channel_struct_t.ptr], hl ; chctx->stream.ptr = data + 3;
|
||||||
|
|
||||||
push af, de, hl
|
exa : push de
|
||||||
call push_stack
|
call push_stack
|
||||||
pop hl, de, af
|
exa : pop de
|
||||||
and a : sbc hl, de ; data -= distance;
|
pop hl : and a : sbc hl, de ; data -= distance;
|
||||||
|
|
||||||
; chctx->stream.frames_to_play = frames_to_play; // hack?
|
; chctx->stream.frames_to_play = frames_to_play; // hack?
|
||||||
ld e, a : ld d, 0 : ld [ix + channel_struct_t.frames_to_play], de
|
ld e, a : ld d, 0 : ld [ix + channel_struct_t.frames_to_play], de
|
||||||
|
|
@ -743,8 +738,7 @@ parse_stream:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.not_pop:
|
.not_pop:
|
||||||
exd
|
ld [ix+channel_struct_t.ptr], hl
|
||||||
ld [ix+channel_struct_t.ptr], de
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; -----------------------------
|
; -----------------------------
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<EFBFBD>0<EFBFBD>@<40>C3<43>p2<70>L,<2C><>C2<43><32>0p+<2B><>L+N<>C$<24><><p*<2A><>L,<2C><>C2<43><32><p+<2B>L+N<>C3<43>p2<70>L,<2C><>C2<43><32>0p3<70><33>L4*<2A>C4<43><34><p4<70><34>H<><48>B<EFBFBD><42>xp:<3A><>C3<43>p2<70>L,<2C><>C2<43><32>0p+<2B><>L+N<>C$<24><><p*<2A><>L,<2C><>C2<43><32><p+<2B>L+N<>C3<43>p2<70>L,<2C><>C2<43><32>0p3<70><33>L4*<2A>C4<43>p4<70><34>
|
Ö0”@ĐC3¶p2ČL,ôËC2ČĐ0p+¶ĐL+NËC$ôĐ<p*ČĐL,ôËC2ČĐ<p+¶L+Nŕ3Đ0p3¶ĐL4*ËC4Đ<p4ĐHËBôĐxp:ČŕUp4ţ
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue