This commit is contained in:
mgcaret 2021-07-29 21:07:55 -07:00
parent 8245ce322b
commit 92e7ed78c6
12 changed files with 20 additions and 31 deletions

View File

@ -4,7 +4,7 @@ PLATFORM=""
ADD_OPTS=""
if [ -n "${1}" -a -d "platforms/${1}" ]; then
PLATFORM="${1}"
ADD_OPTS="${ADD_OPTS} -I platforms/${PLATFORM}/inc"
ADD_OPTS="${ADD_OPTS} -I platforms/${PLATFORM}"
fi
export PLATFORM
echo ".define PLATFORM \"${PLATFORM}\"" > platform.inc

View File

@ -16,7 +16,9 @@
.include "asm/compiler.s" ; Compiler helpers
.include "asm/mathlib.s" ; Math library
.include "asm/memmgr.s" ; Memory (heap) management library
PLATFORM_INCLUDE "platform-lib.s" ; Platform library
.if .strlen(PLATFORM) > 0
.include "platform-lib.s" ; Platform library
.endif
.include "asm/env-dictionary.s" ; Environmental queries dictionary
.include "asm/forth-dictionary.s" ; Forth built-in dictionary

View File

@ -1,21 +1,6 @@
; Macro library for OF816. Contains macros for hand-compiled Forth code and common
; ops used within primitives. Also contains macros for building dictionaries.
; Config/build macros
.macro PLATFORM_INCLUDE file
.if .strlen(PLATFORM) > 0
.out .sprintf("Including text platforms/%s/%s", PLATFORM, file)
.include .sprintf("platforms/%s/%s", PLATFORM, file)
.endif
.endmacro
.macro PLATFORM_INCBIN file
.if .strlen(PLATFORM) > 0
.out .sprintf("Including binary platforms/%s/%s", PLATFORM, file)
.incbin .sprintf("platforms/%s/%s", PLATFORM, file)
.endif
.endmacro
; General macros & defs
.define SHORT_A %00100000

View File

@ -270,7 +270,7 @@ list:
.if include_fcode
.proc romfs
PLATFORM_INCBIN "fcode/romfs.fc"
.incbin "fcode/romfs.fc"
.endproc
.endif

View File

@ -1,7 +1,7 @@
; Apple IIgs Configuration File
; This platform uses it...
PLATFORM_INCLUDE "platform-config.inc"
.include "platform-config.inc"
; *** options ***

View File

@ -2,7 +2,7 @@
cpu_clk = 2800000 ; nominally
PLATFORM_INCLUDE "platform-include.inc"
.include "platform-include.inc"
.proc _scrn_tab
.addr $400
@ -664,4 +664,4 @@ con_wr_n: sty ESCNUM1
inc PwrByte
jsr _emulation_call
jmp _sf_fail
.endproc
.endproc

View File

@ -7,8 +7,8 @@
; -- 01: Bank
; - 09 FDC
; 10-1F Internal Bus Bridge
; 20-27 Flash ROM
; 28-3F Reserved for Flash
; 20-21 Flash ROM
; 22-2F Reserved for Flash
; 30-3F Reserved for Expansion Flash
; 40-47 Video RAM
; 48-7F Reserved for VRAM

View File

@ -1,6 +1,6 @@
; Config file for Neon816 port
;PLATFORM_INCLUDE "platform-config.inc"
;.include "platform-config.inc"
; *** options ***

View File

@ -1,4 +1,4 @@
.p816
.p816
.a16
.i16
.include "macros.inc"
@ -6,6 +6,7 @@
.segment "ROMBOOT"
.proc romboot
; Go full native mode
clc
xce
rep #SHORT_A|SHORT_I
@ -13,14 +14,15 @@
.i16
lda #$01FF
tcs
; Set up MMU for bank 0
; Set up MMU for bank 0 - map all but the top 4K to bank $80,
; leaving the top (MMU) page for ROM
ldx #$001C
lda #$8000
: sta f:NeonMMU,x
dex
dex
bpl :-
jml f:Neon_ROM
jml f:Neon_ROM ; assume main firmware starts at $200000
.endproc
.segment "VECTORS"
@ -29,7 +31,7 @@
.word $FFFF ; FFE0 - reserved
.word $FFFF ; FFE2 - reserved
.word $FFFF ; FFE4 - COP
.word $FFFF ; FFE6 - BRK
.word .loword(romboot) ; FFE6 - BRK - handle like reset for now
.word $FFFF ; FFE8 - ABORT
.word $FFFF ; FFEA - NMI
.word $FFFF ; FFEC - reserved
@ -42,5 +44,5 @@
.word $FFFF ; FFF8 - ABORT
.word $FFFF ; FFFA - NMI
.word .loword(romboot) ; FFFC - RESET
.word $FFFF ; FFFE - IRQ/BRK
.word .loword(romboot) ; FFFE - IRQ/BRK - handle like reset for now
.endproc

View File

@ -1,7 +1,7 @@
; Configuration for W65C816SXB Port
; the W65C816SXB port uses this
PLATFORM_INCLUDE "platform-config.inc"
.include "platform-config.inc"
; *** options ***

View File

@ -278,7 +278,7 @@ list:
.endif
.dword 0
.if romloader_at_init
romldr: PLATFORM_INCBIN "fcode/romloader.fc"
romldr: .incbin"fcode/romloader.fc"
.endif
.endif