Commit Graph

99 Commits

Author SHA1 Message Date
Brad Grantham
8e47791e12 Fix BRA imm instruction, add 0xD2 - CMP (zpg)
I thought 0x80 was a weird NOP imm, but it's BRA.

Implement 0xD2 - CMP (zpg)

Move all 65C02 instruction implementations together

Update disassembler for 0xD2 - CMP (zpg)
2018-08-10 23:25:20 -07:00
Brad Grantham
8567ad7244 make CPU6502::cycles[] class-static 2018-08-08 12:35:38 -07:00
Lawrence Kesteloot
b5918819af Fix off-by-two bug with LK_HACK. 2018-08-07 12:27:46 -07:00
Brad Grantham
49804018cc Asert if cycles[] is not set for insn 2018-08-07 12:21:43 -07:00
Brad Grantham
183aea95fb Add instruction cycle count for ORA (ind) 2018-08-06 00:39:11 -07:00
Brad Grantham
e938af1349 implement STZ zpg and PHX 2018-08-06 00:36:43 -07:00
Lawrence Kesteloot
7d346a06b3 Fix overflow in LK_HACK. 2018-08-06 00:18:40 -07:00
Brad Grantham
3c1017c60b implement STZ abs, fix -debugger 2018-08-06 00:15:58 -07:00
Lawrence Kesteloot
43448014b1 Add ORA (ind) 65C02 instructions. 2018-08-05 23:17:03 -07:00
Brad Grantham
53f231573e ameliorate popping somewhat 2018-08-03 23:58:20 -07:00
Lawrence Kesteloot
dcbea11c33 Pass base address in LK_HACK. 2018-08-03 14:27:00 -07:00
Brad Grantham
37864dea0f mask bus access to 16-bit, add -mute option 2018-08-02 16:49:51 -07:00
Lawrence Kesteloot
bfe64192a3 Parse ld65 map file for symbolic debugging. 2018-08-02 16:07:48 -07:00
Lawrence Kesteloot
14a84bdb6a Add LK hack to disassemble bytes passed at 0xBFFF. 2018-08-02 16:07:48 -07:00
Brad Grantham
4da1e4a2c7 undo enabling of TEXT on startup 2018-08-01 12:00:18 -07:00
Brad Grantham
eaffc29115 fix regular mode changes, disable prints 2018-08-01 11:26:49 -07:00
Brad Grantham
e09d49c323 also send current clock to iterate 2018-08-01 09:29:41 -07:00
Brad Grantham
48be02beb0 add initial support for recording softswitch history by byte clock 2018-08-01 00:42:31 -07:00
Brad Grantham
55bbd69e28 move to per-clock mode setting history within frame
delete set_switches()

Pass history of mode settings to iterate()
2018-07-31 15:33:51 -07:00
Brad Grantham
114af20792 fix hgr scanout addresses, modulo 0x2000 2018-07-31 14:51:51 -07:00
Brad Grantham
9d5d4b4a35 initial floating bus implementation 2018-07-31 14:31:36 -07:00
Brad Grantham
bdcf50f890 implement 0xB2, LDA(zp) 2018-07-31 13:42:09 -07:00
Brad Grantham
992864d5a0 remove debug print for $6000 2018-07-31 12:09:35 -07:00
Brad Grantham
6f92ffa096 add ADC(zpg) 2018-07-31 12:07:42 -07:00
Brad Grantham
ea3930a8f0 change clock to be 14mhz, variable for CPU 2018-07-30 16:01:39 -07:00
Brad Grantham
3bf5f5ed6a Default to TEXT 2018-07-28 12:31:50 -07:00
Brad Grantham
c3adb3abe6 add INC, DEC, and STA (zpg) 2018-07-28 02:50:09 -07:00
Brad Grantham
17488ca7f7 send left-arrow by default when pressing backspace (delete) 2018-07-20 19:37:49 -07:00
Brad Grantham
3dbc37ba35 Port to Linux and fix gcc warnings
Introduce GLEW for GL extension management

Fix warnings about "&" used in logical-AND with precedence likely not matching programmer's intent

Fix a GL shader type incompatibility uint vs int in lores shader

Add Makefile.linux
2018-07-20 16:09:59 -07:00
Brad Grantham
2e7f809bc9 Fix compile errors caused by moving to range for 2017-01-04 22:09:31 -08:00
Brad Grantham
30ec998252 Use range-for on containers 2017-01-03 09:41:38 -08:00
Brad Grantham
453c90d4cf Fix buffer underrun in audio code 2017-01-02 12:02:44 -08:00
Brad Grantham
cb60985ef0 Move audio implementation into interface.cpp
Move all libao operation into interface.cpp
This should have the result of removing all AV and GUI code from apple2e.cpp
OS code remaining in apple2e.cpp should basically be only file I/O, console I/O, and chrono.
2016-12-26 22:28:45 -08:00
Brad Grantham
8817b799b6 Make Lemmings start up (but wrong Lemmings...)
Implement EOR zpg,X
Implement ROL zpg,X (Thanks, Bart and Dad!)
2016-12-26 01:34:57 -08:00
Brad Grantham
33314406c0 use my CPU 2016-12-09 13:06:50 -08:00
Brad Grantham
bbf62836b3 use 1000Hz as audio cutoff 2016-12-07 14:42:28 -08:00
Brad Grantham
e95048d6e9 remove printf in waveform initialization 2016-12-06 18:58:25 -08:00
Brad Grantham
1d8a138123 Slightly better audio using a sine wave approximation
Choose a 2000Hz sine wave as a trade off between smoothing audio and preserving audio

Fix #14
2016-12-06 18:24:11 -08:00
Brad Grantham
456aca2269 Remove termio keyboard, disable 80-col on RESET 2016-12-05 17:27:57 -08:00
Brad Grantham
5b4116fdf2 Also reset other 6502 on RESET 2016-12-05 10:04:38 -08:00
Brad Grantham
ddf4655a43 Implement 80-column mode - ProDOS boots to 80 cols
Catch ALTCHAR but do nothing about it
Catch VID80 (80VID)
Add aux pages to interface.cpp
Plumb aux pages through apple2e.cpp display_write functions
Implement 80-column text shader using aux page
2016-12-04 22:07:00 -08:00
Brad Grantham
85b741e61c whoops, strcmp == 0 if equal 2016-12-04 13:09:56 -08:00
Brad Grantham
ebd5d06e87 ProDos sector ordering for .po files 2016-12-03 10:06:48 -08:00
Brad Grantham
96835e2400 Add drag-and-drop floppies, fix cold-start
On cold-start, force Button0/OpenApple on for a short period
    This is how cold-start (disk boot) is differentiated from plain RESET
Add padding widget that pads another widget on all sides
Add drag-and-drop functionality to widgets and manage through GLFW
Honor current time through all widget methods
Fix character encoding in text_widget (especially for ' ')
Add floppy_icon widget that manages drag-and-drop and drive motor (activity) light
    Later move to vector graphic or bitmap
Add floppy eject and insert notification from APPLE2Einterface
Add activity notification through APPLE2Einterface
Optimize with -O2
2016-12-02 10:42:22 -08:00
Brad Grantham
c5dc2ec782 Honor -fast in UI; lay groundwork for floppy UI 2016-12-01 12:03:40 -08:00
Brad Grantham
620cc1aa04 More instructions: DOS Master boots (crashes to Monitor)
ORA abs, Y
ROR abs, X
2016-11-30 10:42:36 -08:00
Brad Grantham
9cf71aa21f More instructions: Choplifter works
Implement 0x80 (NOP imm, aka "DOP")
TXS doesn't set flags
Remove 65C02 0x80 (BRA imm)
Add ORA (ind, X)
2016-11-30 09:26:19 -08:00
Brad Grantham
ed8dfa33ea Rudimentary paddle support, fix audio stuttering
Mouse/Trackpad drag across the screen emulates paddles
Click on the screen emulates button 0
Ignore reads from C020 (tape out)
Add BRA instruction for 65C02 (maybe not necessary)
Disable audio in FAST mode
Throttle a little better when audio is enabled - stopped stutter
2016-11-29 22:17:17 -08:00
Brad Grantham
cfe9d962d8 BCD mode; SED; AND zpg, X 2016-11-29 00:25:04 -08:00
Brad Grantham
ca376dab5a CAPS lock, More instructions and compatibility
GLFW doesn't pass through Mac CAPS lock key for some reason.
CAPS button in GUI works, though.
Implement more instructions, mostly for ChopLifter
    DEC abs, X
    INC abs, X
    AND (ind), Y
    AND abs, X
    ROR abs
Now ChopLifter needs unimplemented SED!  Probably uses decimal mode while printing score.
Set "then" at end of CPU loop to try to throttle better.  Not sure it helps.
2016-11-28 14:22:22 -08:00