mirror of
https://github.com/jscrane/Apple1.git
synced 2024-12-22 03:30:09 +00:00
...
This commit is contained in:
parent
5922792a6a
commit
dd8e580335
12
README.md
12
README.md
@ -1,5 +1,15 @@
|
||||
Apple-1 Emulator
|
||||
================
|
||||
|
||||
- Emulates an Apple-1 with 32k of RAM
|
||||
- see [napple1](https://github.com/nobuh/napple1)
|
||||
- see also [krusader](http://school.anhb.uwa.edu.au/personalpages/kwessen/apple1/Krusader.htm)
|
||||
|
||||
Keyboard
|
||||
--------
|
||||
- F1: reset
|
||||
- F2: advance tape
|
||||
- F3: rewind tape
|
||||
- F4: load program from tape (by simulating typing it)
|
||||
- F6: checkpoint machine
|
||||
- F7: restore from current checkpoint on tape
|
||||
- F8: enter debug mode (display current processor status on serial port)
|
||||
|
@ -34,7 +34,7 @@ void status(const char *fmt, ...) {
|
||||
}
|
||||
|
||||
jmp_buf ex;
|
||||
r6502 cpu(&memory, &ex, status);
|
||||
r6502 cpu(memory, &ex, status);
|
||||
bool halted = false;
|
||||
const char *filename;
|
||||
|
||||
|
5
io.cpp
5
io.cpp
@ -145,14 +145,15 @@ void io::write_portb(byte b) {
|
||||
|
||||
byte io::read_porta_cr() {
|
||||
byte b = pia::read_porta_cr();
|
||||
if (b == 0xa7) {
|
||||
if (b != 0xa7)
|
||||
return b;
|
||||
|
||||
if (_loading) {
|
||||
if (tape.more())
|
||||
enter(tape.read());
|
||||
else
|
||||
_loading = false;
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
|
10
pia.cpp
10
pia.cpp
@ -3,6 +3,11 @@
|
||||
#include "pia.h"
|
||||
|
||||
void pia::operator=(byte b) {
|
||||
Serial.print(millis());
|
||||
Serial.print(" > ");
|
||||
Serial.print(_acc, 16);
|
||||
Serial.print(' ');
|
||||
Serial.println(b, 16);
|
||||
switch(_acc % 4) {
|
||||
case 0:
|
||||
write_porta(b);
|
||||
@ -20,6 +25,11 @@ void pia::operator=(byte b) {
|
||||
}
|
||||
|
||||
pia::operator byte() {
|
||||
/*
|
||||
Serial.print(millis());
|
||||
Serial.print(" < ");
|
||||
Serial.println(_acc, 16);
|
||||
*/
|
||||
switch (_acc % 4) {
|
||||
case 0:
|
||||
return read_porta();
|
||||
|
Loading…
Reference in New Issue
Block a user