mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-10-31 20:09:02 +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
|
// Start the processor
|
||||||
core6502.Reset(&s)
|
core6502.Reset(&s)
|
||||||
|
t.prepare()
|
||||||
for true {
|
for true {
|
||||||
core6502.ExecuteInstruction(&s, log)
|
core6502.ExecuteInstruction(&s, log)
|
||||||
t.dumpIfDirty()
|
t.dumpIfDirty()
|
||||||
|
@ -34,10 +34,16 @@ func textMemoryByteToStringHex(value uint8) string {
|
|||||||
return fmt.Sprintf("%02x ", value)
|
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() {
|
func (tp *textPages) dump() {
|
||||||
// See "Understand the Apple II", page 5-10
|
// See "Understand the Apple II", page 5-10
|
||||||
// http://www.applelogic.org/files/UNDERSTANDINGTHEAII.pdf
|
// http://www.applelogic.org/files/UNDERSTANDINGTHEAII.pdf
|
||||||
|
|
||||||
|
fmt.Print("\033[26A")
|
||||||
|
|
||||||
fmt.Println("------------------------------------------")
|
fmt.Println("------------------------------------------")
|
||||||
|
|
||||||
var i, j, h uint8
|
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.
|
// Reset resets the processor state. Moves the program counter to the vector in 0cfffc.
|
||||||
func Reset(s *State) {
|
func Reset(s *State) {
|
||||||
startAddress := s.Mem.getWord(0xfffc)
|
startAddress := s.Mem.getWord(0xfffc)
|
||||||
fmt.Println(startAddress)
|
|
||||||
s.Reg.setPC(startAddress)
|
s.Reg.setPC(startAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user