Skip to content

Commit 2032ffc

Browse files
author
ejaquay
committed
Update makefile to allow setting bootrom path and improve comments.
1 parent 4706b2c commit 2032ffc

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
moduledir
2+
vccromdir
13
bootstrap
24
bootstrap.rom
35
*.swp

bootstrap.asm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* After assembly boottrack with boot_emu is appended.
55
* ops="--raw -D DISKROM=1 -D H6309=1 -D DEBUG=0"
6-
* lwasm $ops -o bootstrap bootstrap.asm
6+
* lwasm $ops -o bootstrap bootstrap.asm
77
* cat bootstrap boottrack > bootstrap.rom
88
* truncate -s 8192 bootstrap.rom
99
*
@@ -17,7 +17,7 @@
1717
* When Super Extended Basic sees a rom starting with "DK" it
1818
* is processed as a disk11 rom. Basic copies it to ram then
1919
* makes changes to it before jumping to $C002. We need to set
20-
* ROM mode to avoid those changes.
20+
* back to ROM mode to not see those changes.
2121

2222
IFNE DISKROM
2323
fcc "DK" ROM to disk11 rom
@@ -27,6 +27,10 @@
2727
ENDC
2828

2929
* Copy bootstrap containing REL, BOOT, and KRN to $2600.
30+
* REL will copy these to $ED00 and run them. It is possible
31+
* to copy bootstrap to $ED00 directly by switching back and
32+
* forth between ROM and RAM modes as chunks are copied but
33+
* this is not done here.
3034

3135
ldu #boottrack where the bootstrap modules are
3236
ldy #$2600 where they are copied to low RAM

makefile

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
# Need to know where the modules are
2-
ifndef NITROS9DIR
3-
NITROS9DIR = $(HOME)/git/nitros9
4-
endif
51

2+
# ROM build options. See bootstrap.asm for their purpose
63
ROMOPTS = -D DISKROM=1 -D H6309=1 -D DEBUG=0
74

8-
# Adjust boot targets here
9-
REL = $(NITROS9DIR)/level2/coco3_6309/modules/rel_80
10-
BOOT = $(NITROS9DIR)/level2/coco3_6309/modules/boot_emu
11-
KRN = $(NITROS9DIR)/level2/coco3_6309/modules/krn
5+
# Rom and nitros9 module paths. These can be adjusted to suit
6+
BOOTROM = ./vccromdir/bootstrap.rom
7+
MODDIR = ./moduledir
8+
REL = $(MODDIR)/rel_80
9+
BOOT = $(MODDIR)/boot_emu
10+
KRN = $(MODDIR)/krn
1211

13-
# NOTE: You may have to add boot_emu to the BOOTERS target
14-
# in $(NITROS9DIR)/level2/coco3/modules/makefile
15-
16-
all: bootstrap.rom
12+
all: $(BOOTROM)
1713

1814
clean:
19-
@rm -f bootstrap bootstrap.rom
15+
rm -f bootstrap $(BOOTROM)
16+
make all
2017

2118
bootstrap: bootstrap.asm
2219
lwasm $(ROMOPTS) --raw -o$@ $<
2320

24-
bootstrap.rom: bootstrap $(REL) $(BOOT) $(KRN)
21+
$(BOOTROM): bootstrap $(REL) $(BOOT) $(KRN)
2522
cat $^ > $@
26-
truncate -s 8192 bootstrap.rom
23+
truncate -s 8192 $(BOOTROM)

0 commit comments

Comments
 (0)