mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-21 02:32:06 +00:00
Improved console output redrawing the screen in place
This commit is contained in:
parent
33ccf5e4c3
commit
819c9f7eb9
@ -18,6 +18,7 @@ func Run(romFile string, log bool) {
|
||||
|
||||
// Start the processor
|
||||
core6502.Reset(&s)
|
||||
t.prepare()
|
||||
for true {
|
||||
core6502.ExecuteInstruction(&s, log)
|
||||
t.dumpIfDirty()
|
||||
|
@ -34,10 +34,16 @@ func textMemoryByteToStringHex(value uint8) string {
|
||||
return fmt.Sprintf("%02x ", value)
|
||||
}
|
||||
|
||||
func (tp *textPages) prepare() {
|
||||
fmt.Printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
|
||||
}
|
||||
|
||||
func (tp *textPages) dump() {
|
||||
// See "Understand the Apple II", page 5-10
|
||||
// http://www.applelogic.org/files/UNDERSTANDINGTHEAII.pdf
|
||||
|
||||
fmt.Print("\033[26A")
|
||||
|
||||
fmt.Println("------------------------------------------")
|
||||
|
||||
var i, j, h uint8
|
||||
|
@ -550,7 +550,6 @@ func ExecuteInstruction(s *State, log bool) {
|
||||
// Reset resets the processor state. Moves the program counter to the vector in 0cfffc.
|
||||
func Reset(s *State) {
|
||||
startAddress := s.Mem.getWord(0xfffc)
|
||||
fmt.Println(startAddress)
|
||||
s.Reg.setPC(startAddress)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user