Skip to content

Commit

Permalink
Make the X16 port build.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Dec 17, 2023
1 parent 0425bde commit d141886
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"pet8032.d64": "src/arch/commodore+pet8032_diskimage",
"pet8096.d64": "src/arch/commodore+pet8096_diskimage",
"vic20.d64": "src/arch/commodore+vic20_diskimage",
"x16.zip": "src/arch/x16+diskimage",
},
)
2 changes: 1 addition & 1 deletion src/arch/commodore/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@Rule
def mkcbmfs(self, name, items: TargetsMap = {}, title="CBMFS", id=None):
cs = []
cs = ["rm -f {outs[0]}"]
ins = []

cmd = "chronic cc1541 -q "
Expand Down
43 changes: 43 additions & 0 deletions src/arch/x16/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from build.ab import normalrule
from tools.build import mkdfs, mkcpmfs
from build.llvm import llvmrawprogram
from config import (
MINIMAL_APPS,
MINIMAL_APPS_SRCS,
BIG_APPS,
BIG_APPS_SRCS,
)

llvmrawprogram(
name="x16",
srcs=["./x16.S"],
deps=["include", "src/lib+bioslib", "src/arch/commodore+commodore_lib"],
linkscript="./x16.ld",
)

mkcpmfs(
name="cpmfs",
format="generic-1m",
items={"0:ccp.sys": "src+ccp"}
| MINIMAL_APPS
| MINIMAL_APPS_SRCS
| BIG_APPS
| BIG_APPS_SRCS,
)

normalrule(
name="diskimage",
ins=[
".+cpmfs",
".+x16",
"src+bdos",
],
outs=["x16.zip"],
commands=[
"zip -9qj {outs[0]} {ins}",
r'printf "@ src+bdos\n@=BDOS\n" | zipnote -w {outs[0]}',
r'printf "@ x16+x16\n@=CPM\n" | zipnote -w {outs[0]}',
r'printf "@ x16+cpmfs.img\n@=CPMFS\n" | zipnote -w {outs[0]}',
],
label="ZIP",
)
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/x16.ld → src/arch/x16/x16.ld
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SECTIONS {
.zp : {
*(.zp .zp.*)
__ZP1_START__ = .;
__ZP1_END__ = 0x100;
__ZP1_END__ = 0xff;

__ZP0_START__ = 0x22;
__ZP0_END__ = 0x80;
Expand Down

0 comments on commit d141886

Please sign in to comment.