Open PuercoPop opened 8 years ago
It appears I've reported it in the wrong project, the offending code is in cl-6502
Yikes. There is a reinitialize-instance
method but it doesn't initialize based on the values of the initforms which runs counter to my needs here: http://clhs.lisp.se/Body/f_reinit.htm
That's why I used plain old initialize-instance
(http://clhs.lisp.se/Body/f_init_i.htm). I didn't see any language explicitly prohibiting it's use on non-new instances but I should investigate more thoroughly. Thanks for the bug report!
I asked on #lisp, although there was no passage of the MOP that explicitly says so, it appears there is no guarantee for initialize-instance to work as desired.
I've hand written a reset method for cl-6502:cpu and for famiclom:nes for the time being, let me know if you consider that an acceptable solution. If so I'll submit the PR.
After
(reset *nes*)
the CPU, PPU and APU have the value of its initform instead of the result of evaluating it.I have yet to determine if it is invalid to call initialize-instance on objects already initialized or if it is an issue with CCL