Skip to content

Commit

Permalink
Add stub to get sim6502 build working
Browse files Browse the repository at this point in the history
  • Loading branch information
Eggbertx committed Oct 3, 2024
1 parent ea1e578 commit 0c3512d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build/
packages/
*.user*
src/*.s
src/*.o
*.o
src/rom_embed.h
zcc*
/SDL*
Expand Down
12 changes: 12 additions & 0 deletions asm/sim6502_time.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; _clock_gettime stub for sim6502

.include "time.inc"
.import return0
.export _clock_gettime


.code

.proc _clock_gettime
jmp return0
.endproc
4 changes: 3 additions & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def build(platform = "native", library = "sdl", debugging = False, debug_keys=Fa
if not in_pathenv("cl65"):
fatal_print("Unable to find the cc65 development kit, required to build for 65xx targets")
sources += " src/io_{}.c".format(platform)
if platform == "sim6502":
sources += " asm/sim6502_time.s"

cmd = "cl65 -Osir {debug_flag} -o {oc8_out} -t {platform} -Cl {listing} -D{io_const}_IO -D__EMBED_ROM__ {sources}".format(
debug_flag = "-g -Ln oc8.lbl" if debugging else "",
Expand Down Expand Up @@ -251,7 +253,7 @@ def run_tests(coverage = True):
def clean():
print("Cleaning up")
fs_action("delete", "build/")
del_files = glob.glob("oc8*") + glob.glob("src/*.o") + ["zcc_opt.def", "SDL2.dll", "src/rom_embed.h", "x64", "packages", "build"]
del_files = glob.glob("oc8*") + glob.glob("src/*.o") + ["zcc_opt.def", "SDL2.dll", "src/rom_embed.h", "x64", "packages", "build", "Testing"]
for del_file in del_files:
fs_action("delete", del_file)

Expand Down

0 comments on commit 0c3512d

Please sign in to comment.