Compare commits
10 commits
4dfde387e4
...
c076aa2055
Author | SHA1 | Date | |
---|---|---|---|
c076aa2055 | |||
677b6a2f56 | |||
2206b1f864 | |||
ec867b25d3 | |||
a32dea0a11 | |||
36c8d52388 | |||
bf2e6f8035 | |||
c0dc98a2c9 | |||
e00474bc98 | |||
a206de1007 |
103 changed files with 56 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
# !/bin/bash
|
||||
#Note that program start at $080D
|
||||
cl65 -o build/file.prg -u __EXEHDR__ -t c64 -C c64-asm.cfg -l build/program.lst source.s -Ln build/program.lbl \
|
||||
cl65 -o build/host.prg -u __EXEHDR__ -t c64 -C c64-asm.cfg -l build/program.lst source.s -Ln build/program.lbl \
|
||||
|
||||
#VICE do not like -
|
||||
sed -i 's/-/m/g' program.lbl
|
45
host/mainloop.s
Normal file
45
host/mainloop.s
Normal file
|
@ -0,0 +1,45 @@
|
|||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||
.scope mainsetup
|
||||
USERPROG = $C000
|
||||
.repeat 4, I
|
||||
ldy #$00
|
||||
:
|
||||
lda batch_userprog+(I*256),Y
|
||||
sta USERPROG+(I*256),Y
|
||||
dey
|
||||
bne :-
|
||||
.endrep
|
||||
.endscope
|
||||
|
||||
.scope mainloop
|
||||
ml:
|
||||
USERPROG = $C000
|
||||
RASTER = $D012
|
||||
;; Currently no code for fetching new programs, since we're testing with
|
||||
;; batch compiled version of the whole to begin with.
|
||||
|
||||
;; Bank in character ROM
|
||||
lda #%11111011
|
||||
and $01
|
||||
sta $01
|
||||
|
||||
jsr USERPROG
|
||||
|
||||
;; Bank out character ROM, I/O in
|
||||
lda #%00000100
|
||||
ora $01
|
||||
sta $01
|
||||
@framewait:
|
||||
ldy RASTER
|
||||
cpy #$66
|
||||
beq @framewait
|
||||
inc FRAMECOUNT
|
||||
jmp ml
|
||||
.endscope
|
||||
|
||||
.proc time ; user-procedure
|
||||
lda FRAMECOUNT
|
||||
rts
|
||||
.endproc
|
||||
|
||||
FRAMECOUNT: .byte 0
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||
.debuginfo + ; Generate debug info
|
||||
.org $080D
|
||||
;;Macros
|
||||
.include "macros/16aritmatic.s"
|
||||
;;inc files
|
||||
|
@ -26,7 +27,7 @@
|
|||
;.include "routines/triangle/triangle_test.s"
|
||||
exit:
|
||||
JMP exit
|
||||
.include "../wip-duuqnd/public.inc"
|
||||
.include "public.inc"
|
||||
.include "routines/line/line.s"
|
||||
.include "routines/circle/circle.s"
|
||||
.include "routines/triangle/triangle.s"
|
||||
|
@ -37,4 +38,8 @@ JMP exit
|
|||
.include "routines/memory/memcpy.s"
|
||||
.include "routines/arithmatic/mult.s"
|
||||
.include "routines/arithmatic/div.s"
|
||||
|
||||
batch_userprog:
|
||||
.incbin "userprog.bin", 0, 1024
|
||||
|
||||
.include "END.s"
|
|
@ -50,8 +50,8 @@
|
|||
;; TODO: Handle case of too many arguments (? not realistically needed)
|
||||
t)
|
||||
|
||||
(defparameter +argvec-offset+ #x00)
|
||||
(defparameter +varvec-offset+ #x08)
|
||||
(defparameter +argvec-offset+ #xF0)
|
||||
(defparameter +varvec-offset+ #x20)
|
||||
|
||||
(defmacro with-variable-allocations (allocations &body body)
|
||||
`(let ((*variable-allocations* (make-hash-table)))
|
|
@ -68,8 +68,8 @@
|
|||
(parse-asm-declaration main-text)
|
||||
(list name address declaration)))))
|
||||
|
||||
(defparameter *program-listing-filepath* #P"../../wip-hugo/program.lst")
|
||||
(defparameter *program-build-filepath* #P"../../wip-hugo/build.sh")
|
||||
(defparameter *program-listing-filepath* #P"../host/build/program.lst")
|
||||
(defparameter *program-build-filepath* #P"../host/build.sh")
|
||||
|
||||
(defun check-for-asm-build-script ()
|
||||
(do ((path *program-build-filepath*))
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue