Another issue with several .asd files, no readme and not sure how to start. I am interested as this is simpler than the one here. At least the programmer has a test ROM sort of. Just not sure how to start.
As might be noticed, I have spent a few days here to try to sort out a way to start a simple (and possibly) interesting simple lisp project. NES as said in that web page is great. Just no good starting point (or may I say too complete as a starting point) for lisp project.
I think if you've never written any sort of lower level code before it's somewhat more daunting. I did spend a little time trying to get this emulator to run but ran into too many issues and gave up -- it's either a problem with some optimizations no longer being valid and raising type errors by default now (e.g. specifying a type as string does not, like other languages, implicitly mean it's either string or null¹) or something about the sdl2 bindings has changed (it's not the most stable of library binds unfortunately and has some misleading docs/examples out there, and the with- macros are not good and best avoided).
The assembler project I linked on the other hand works, though as you say having multiple asdf files is annoying, and the dollhouse.lisp demo makes an unfortunate choice of setting its *path* to #.*compile-file-pathname* Here's what I did to run it without changing that line (which would be better), translate to your flavor of editor+slime for convenience:
$ git clone https://github.com/ahefner/asm6502
$ cd asm6502/
$ sbcl
* (asdf-here)
; my own function I have in ~/.sbclrc, it is just:
;(defun asdf-here ()
; (push (uiop:getcwd) asdf:*central-registry*))
* (asdf:load-system "ichr")
T
* (defpackage :dollhouse-demo)
#<PACKAGE "DOLLHOUSE-DEMO">
* (defvar dollhouse-demo::*path* "hacks/")
DOLLHOUSE-DEMO::*PATH*
* (load "hacks/dollhouse.lisp")
; ...output
;
;(:NUM-UNIQUE 458)
;Empty space begins at F600
;Created "/tmp/dollhouse.nes"
T
* ^D
$ fceux /tmp/dollhouse.nes
¹Example of SBCL raising a type error:
(let ((x 3))
(declare (type integer x))
x)
; -> 3
(let ((x nil))
(declare (type integer x))
x)
; in: LET ((X NIL))
; (LET ((X NIL))
; (DECLARE (TYPE INTEGER X))
; X)
;
; caught WARNING:
; Constant NIL conflicts with its asserted type INTEGER.
; See also:
; The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
; caught 1 WARNING condition
debugger invoked on a SIMPLE-TYPE-ERROR in thread
#<THREAD tid=9761 "main thread" RUNNING {1001750003}>:
Value of NIL in
(LET ((X NIL))
(DECLARE (TYPE INTEGER X))
X)
is
NIL,
not a
INTEGER.
As might be noticed, I have spent a few days here to try to sort out a way to start a simple (and possibly) interesting simple lisp project. NES as said in that web page is great. Just no good starting point (or may I say too complete as a starting point) for lisp project.