clones icon indicating copy to clipboard operation
clones copied to clipboard

What is the clones project used for ?

Open kwccoin opened this issue 1 year ago • 0 comments

Me again. Build the test script and whilst cl-6502 at least I can use it to test 6502 codes, what is this clones can do?

  • generate rom?
  • running nes (but where is the graphics) ...

Wonder

my test script is as below:

; rlwrap sbcl --script fc1<tab>

(format t "~a~%" (+ 1 2))

(require :sb-posix)
(load "~/quicklisp/setup.lisp")
(format t "~a~%" (sb-posix:getcwd))

; not using local-project to ease amendment and testing
; both cl-6502 and clones are in my own git directories ... 
(pushnew (sb-posix:getcwd) quicklisp:*local-project-directories* :test #'equalp)
; seems it will get all asd even in sub-directory

(ql:quickload :prove)
(ql:quickload :SPLIT-SEQUENCE)
(ql:quickload :clones)
(let ((prove:*enable-colors* nil)) (asdf:test-system :clones))
; seems would have issues if you do no disable colors even in normal terminal
; not just emacs 

(ql:quickload :clones-test)
(clones-test.helpers:run-file "cpu")
(clones-test.helpers:run-file "helpers")
(clones-test.helpers:run-file "mappers")
(clones-test.helpers:run-file "memory")
(clones-test.helpers:run-file "rom")


(format t "---------- test clones done ---------~%")

(ql:quickload 'cl-6502)
(ql:quickload 'cl-6502-test)

(in-package :6502-tests)

;(progn (speedrun-brk) (sb-ext:quit))
; will hang --> (speedrun)
(speedrun-brk) 
;(sb-ext:exit)

(in-package :cl-6502)

(setf *print-base* 16)
(setf *read-base* 16)
(format t "~A~%" *CPU*)

(setf (get-range FD)  '(A9 FF 
                        8D 00 06  
                        A9 FE
                        8D 01 06
                        A9 FD
                        8D 02 06
                        A9 FC
                        8D 03 06
                        00 
                        60) )
(disasm FD 112)
(get-range 600 610)
(format t "~A~%" *CPU*)
(asm "JMP $FD")
(setf (get-range FFFC) '(4C FD 0))
(get-range FFFC FFFF)
(disasm FFFC FFFF)
(setf (get-range 0) '(4C FD 0))
(get-range 0 9) ; A ok but not the next step
(disasm 0 9) ; cannot do to A; has issue ??
(format t "~A~%" *CPU*)
(execute *cpu*)
(get-range 600 610)
; cannot do this --> (disasm 600 610) ??
(format t "~A~%" *cpu*)
; (jit-cpu *cpu* FD) <-- cannot do; jit-cpu not defined ...

;(sb-ext:exit)
(format t "---------- cl:6502 test done ---------~%")

kwccoin avatar Nov 22 '23 08:11 kwccoin