Procházet zdrojové kódy

z80: make boot binary a 2-part process

Previously, recipes that began spitting binary contents before
loading block 282 would end up with VARIABLE code in their binary,
thus breaking them. We fix this by making this loading process
2-part.
master
Virgil Dupras před 3 roky
rodič
revize
1312817117
8 změnil soubory, kde provedl 26 přidání a 19 odebrání
  1. +4
    -1
      blk/281
  2. +0
    -1
      blk/282
  3. +3
    -3
      blk/618
  4. +2
    -2
      emul/xcomp.fs
  5. +2
    -1
      recipes/sms/xcomp.fs
  6. +2
    -1
      recipes/ti84/xcomp.fs
  7. +8
    -8
      recipes/trs80/xcomp.fs
  8. +5
    -2
      recipes/z80mbc2/xcomp.fs

+ 4
- 1
blk/281 Zobrazit soubor

@@ -9,4 +9,7 @@ esses. The rest of the Collapse OS code depend on it. In fact,
up until 0x67, the (?br) wordref, pretty much everything has
to stay put.

To assemble, run "282 LOAD".
The boot binary is loaded in 2 parts. The first part, "decla-
rations", are loaded after xcomp, before xcomp overrides, with
"282 LOAD". The rest, after xcomp overrides, with "283 335
LOADR".

+ 0
- 1
blk/282 Zobrazit soubor

@@ -1,3 +1,2 @@
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblexec
VARIABLE lblfind
1 53 LOADR+

+ 3
- 3
blk/618 Zobrazit soubor

@@ -5,9 +5,9 @@
5 CONSTANT SDC_CSLOW 6 CONSTANT SDC_CSHIGH
RAMSTART 0x70 + CONSTANT ACIA_MEM
212 LOAD ( z80 assembler )
262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
282 LOAD ( boot.z80 ) 353 LOAD ( xcomp core low )
582 LOAD ( acia )
262 LOAD ( xcomp ) 282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides ) 283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low ) 582 LOAD ( acia )
380 LOAD ( xcomp core high )
(entry) _
( Update LATEST )


+ 2
- 2
emul/xcomp.fs Zobrazit soubor

@@ -3,9 +3,9 @@
0xfffa CONSTANT PS_ADDR
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )

282 LOAD ( boot.z80 )
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
: (emit) 0 PC! ;
: (key) 0 PC@ ;


+ 2
- 1
recipes/sms/xcomp.fs Zobrazit soubor

@@ -15,6 +15,7 @@ RAMSTART 0x72 + CONSTANT PAD_MEM
: ZFILL, ( u ) 0 DO 0 A, LOOP ;
262 LOAD ( xcomp )
524 LOAD ( font compiler )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )

0x100 JPnn, 0x63 ZFILL, ( 0x66 )
@@ -22,7 +23,7 @@ RETN, 0x98 ZFILL, ( 0x100 )
( All set, carry on! )
CURRENT @ XCURRENT !
0x100 BIN( !
282 LOAD ( boot.z80 )
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
CREATE ~FNT CPFNT7x7
623 628 LOADR ( VDP )


+ 2
- 1
recipes/ti84/xcomp.fs Zobrazit soubor

@@ -8,6 +8,7 @@ RAMSTART 0x72 + CONSTANT KBD_MEM
: ZFILL, ( u ) 0 DO 0 A, LOOP ;
262 LOAD ( xcomp )
522 LOAD ( font compiler )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )

( TI-84+ requires specific code at specific offsets which
@@ -59,7 +60,7 @@ HALT,
CURRENT @ XCURRENT !

0x100 BIN( !
282 LOAD ( boot.z80 )
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
CREATE ~FNT CPFNT3x5
555 560 LOADR ( LCD low )


+ 8
- 8
recipes/trs80/xcomp.fs Zobrazit soubor

@@ -1,15 +1,15 @@
0xff00 CONSTANT RS_ADDR
0xfffa CONSTANT PS_ADDR
RS_ADDR 0x80 - CONSTANT RAMSTART
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
270 LOAD ( xcomp overrides )
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
0x3000 BIN( !
282 LOAD ( boot.z80 )
353 LOAD ( xcomp core low )
492 LOAD ( trs80 )
380 LOAD ( xcomp core high )
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
492 LOAD ( trs80 )
380 LOAD ( xcomp core high )
(entry) _
( Update LATEST )
PC ORG @ 8 + !


+ 5
- 2
recipes/z80mbc2/xcomp.fs Zobrazit soubor

@@ -1,8 +1,11 @@
0xff00 CONSTANT RS_ADDR 0xfffa CONSTANT PS_ADDR
RS_ADDR 0x80 - CONSTANT RAMSTART
212 LOAD ( z80 assembler )
262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
282 LOAD ( boot.z80 ) 353 LOAD ( xcomp core low )
262 LOAD ( xcomp )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
CODE (emit)
A 1 LDrn, 1 OUTnA, HL POPqq, A L LDrr, 0 OUTnA,
;CODE


Načítá se…
Zrušit
Uložit