Commit Graph
100 Commits
Author SHA1 Message Date
Peter Evans e51e643294 Force $C059 to do nothing 2018-03-26 20:47:41 -05:00
Peter Evans b2e9198ede Defensive conditionals 2018-03-26 20:46:55 -05:00
Peter Evans 81bcc7d973 We also need to check ACC in ASL/LSR/ROL/ROR
And, possibly more importantly--opcode is not a bool.
2018-03-25 20:34:12 -05:00
Peter Evans 3439ec51a8 inc and dec should work with a zero-address
Just checking if (cpu->eff_addr) is not sufficient. We need to check the
address mode; only increment or decrement the A register if the mode is
literally ACC.
2018-03-25 19:42:55 -05:00
Peter Evans 8a285aace8 Enlargen the nibble segment length 2018-03-25 19:39:54 -05:00
Peter Evans 0c244cf3f2 Slight update to sector header length 2018-03-25 19:39:27 -05:00
Peter Evans 64306fa5a6 Add hidump, hires_dump commands 2018-03-25 19:39:00 -05:00
Peter Evans 64afcb2040 Rewrite phaser to use state transitions, whole phase states
By whole phase states, I mean we no longer track if more than one phase
is active.
2018-03-23 19:41:01 -05:00
Peter Evans 2870bc03bc Remove option flags; remove unnecessary --flash option 2018-03-21 15:26:58 -05:00
Peter Evans a461194a63 More clearly check opposite phases
And prev should not be checked
2018-03-21 15:11:03 -05:00
Peter Evans 443f9d1a01 Only zero page and stack should be affected by ALTZP 2018-03-21 15:09:40 -05:00
Peter Evans 5ea10d8a98 We track steps in quarter tracks, so double the max 2018-03-20 15:07:55 -05:00
Peter Evans 474104085c Reorganize encoded sizes/routines to align with reference nibble output
(This is comparing to the output that we see from dsk2nib.)
2018-03-20 14:06:26 -05:00
Peter Evans f5e0de5bbc Reverting to just black/white color for now
Only while I work on some other issues with disk loading
2018-03-19 19:02:46 -05:00
Peter Evans 2baa2fac75 Significant rewrites and slightly better understanding 2018-03-18 00:15:55 -05:00
Peter Evans 82906e74f8 Decrease frame rate per second 2018-03-18 00:01:40 -05:00
Peter Evans 2eccb288a4 Update to use NTSC Corrected color values 2018-03-14 23:50:53 -05:00
Peter Evans bff83bc315 Implement first pass at hires draw
Note: it's a hot mess
2018-03-14 00:57:50 -05:00
Peter Evans 68f9daf6ac Add -O3 optimization
Also add debugging symbols in the unit test version (which we didn't
have???)
2018-03-14 00:12:00 -05:00
Peter Evans 47bbed1399 Add color tables, row table 2018-03-14 00:05:26 -05:00
Peter Evans ec00bb2a87 It's the columns which matter, not rows 2018-03-13 16:14:38 -05:00
Peter Evans 4d34663435 Add hires graphics file; draw hires graphics 2018-03-13 16:08:31 -05:00
Peter Evans 52e5f8afa7 Add missing decl for apple2_draw_lores() 2018-03-13 15:55:43 -05:00
Peter Evans 809c1724f1 Add test for lores_color, skip on draw 2018-03-13 15:46:21 -05:00
Peter Evans 0e3a0889f3 Punt on testing 2018-03-13 15:42:08 -05:00
Peter Evans 62d868f1aa Add tests for row, col functions 2018-03-13 15:40:37 -05:00
Peter Evans a5c777b3e9 Remove --size flag for now
I may add an option for full size in the future
2018-03-13 15:22:47 -05:00
Peter Evans 2c676e144a Rename test to open_file 2018-03-13 15:19:26 -05:00
Peter Evans d0b085fd7a Add test for hexdump 2018-03-13 15:18:54 -05:00
Peter Evans 851bc85860 We should print the final line if from is still >= to
This can happen if the region of to - from is not cleanly divisible by
16.
2018-03-13 15:17:33 -05:00
Peter Evans ed32f73e98 Use another pointer to retain the original address to free
This also resolves an issue where we weren't attempting to free the
duplicated string when returning early.
2018-03-13 11:00:44 -05:00
Peter Evans a243ed3d35 Add docblock comments 2018-03-13 00:53:46 -05:00
Peter Evans 7d9879f843 Add file for lores tests 2018-03-13 00:50:10 -05:00
Peter Evans f33f9cd493 Remove unnecessary check if tok == NULL
This also corrects a formatting error (no space between the rparen of
the if and the lbrace of the code block).
2018-03-13 00:33:32 -05:00
Peter Evans 090307f4fe Removed unnecessary code 2018-03-13 00:28:24 -05:00
Peter Evans 7d043abc9f Force removal of test program 2018-03-13 00:27:10 -05:00
Peter Evans dc8a431f87 Always notify the screen of a refresh required 2018-03-13 00:13:59 -05:00
Peter Evans 19d006e9a3 Update tests to include register info 2018-03-13 00:12:52 -05:00
Peter Evans 5dcc25f5eb Reject -1 rows and columns 2018-03-12 00:33:22 -05:00
Peter Evans 543e3d0b73 Use uint32_t for all fields 2018-03-12 00:33:08 -05:00
Peter Evans 97865e9589 Subtract 0x400 for the correct offset 2018-03-12 00:32:42 -05:00
Peter Evans e868718f31 (No, really, use the color blue) 2018-03-11 23:48:40 -05:00
Peter Evans df960220ef First crack at lo-res graphics 2018-03-11 23:28:28 -05:00
Peter Evans 5a43ca9a7a Return random data in read contexts
This applies only to addresses which aren't meant to return meaningful
data.
2018-03-10 22:36:31 -06:00
Peter Evans ce6f3c5835 Return bit 7 high if we set a flag on 2018-03-10 22:21:03 -06:00
Peter Evans 550eab742e Move hdump into correctly sorted slot 2018-03-09 16:51:12 -06:00
Peter Evans 74e8a30a4c Disassemble flag now works as intended 2018-03-09 16:46:04 -06:00
Peter Evans ab6e6b03db Use option_open_file() 2018-03-09 16:45:39 -06:00
Peter Evans 87c7aa9249 Add hexdump function for vm_segment 2018-03-09 16:45:20 -06:00
Peter Evans 1ff5d17f19 Add hexdump command 2018-03-09 16:44:53 -06:00
Peter Evans 267171ea4a Change to option_open_file(), allow any file mode 2018-03-09 16:44:20 -06:00
Peter Evans 1235197418 Only fprintf if we know stream is not NULL 2018-03-07 21:24:29 -06:00
Peter Evans dda7ae6288 When paused for the debugger, output should go to stdout 2018-03-07 21:24:15 -06:00
Peter Evans d791ebbe2f Remove some unnecessary comments 2018-03-07 21:07:39 -06:00
Peter Evans 4d2f4ffd5f Set width/height as soon as we parse 2018-03-07 20:55:04 -06:00
Peter Evans 14123882c2 Use vm_di_get for file streams to close them 2018-03-07 20:54:46 -06:00
Peter Evans f555196080 Test for !OK with system data addresses 2018-03-07 20:42:27 -06:00
Peter Evans 4d4fbdf79a Switch to vm_di for option variable storage
Things like disk1, disk2, width/height, etc.
2018-03-07 20:25:39 -06:00
Peter Evans 58190f0c9b Move notify_refresh into the proper file 2018-03-07 17:08:16 -06:00
Peter Evans 0edfcaf370 Add test for notify_refresh, skip for draw 2018-03-07 17:06:50 -06:00
Peter Evans c3b86031bd Add tests for primary, alternate functions 2018-03-07 17:00:11 -06:00
Peter Evans 9cbfcac783 Add missing docblock comments 2018-03-07 16:28:11 -06:00
Peter Evans 9f09be93a9 Implement (true? better?) framerate cycle 2018-03-07 16:20:29 -06:00
Peter Evans f1c0716313 Include draw.h header 2018-03-07 15:33:09 -06:00
Peter Evans b00442a1c4 Change width/height to 3x apple window size 2018-03-07 15:23:00 -06:00
Peter Evans d5450bf743 Refresh once every 30th of a second
*Roughly...
2018-03-07 00:20:27 -06:00
Peter Evans 91291be889 Draw the full screen at boot time to emulate initial look
Which is to say, the initial look of @ symbols filling up your screen.
2018-03-07 00:19:51 -06:00
Peter Evans b2df144850 Remove blank-space render to speed up render time 2018-03-07 00:15:25 -06:00
Peter Evans 7edf0c5dbd Display @ symbols on startup
There's actually a lot going on here to make the @ symbol display
happen.

The @ symbols are the visual representation of NUL-character bytes. They
are inverse video, as dictated by the Apple //e technical reference. As
part of the bootup sequence, those bytes are overwritten with space
characters.

As part of the work, we now have a table of rows and columns that map to
display buffer addresses.
2018-03-06 22:12:41 -06:00
Peter Evans 1a6d8b6ced Actually do render control characters 2018-03-06 12:46:33 -06:00
Peter Evans 136d019f7a Show non-inversed text for Apple //e 2018-03-06 12:41:30 -06:00
Peter Evans 5fa696005d Slash character should be a forward slash 2018-03-06 00:28:52 -06:00
Peter Evans 9562dd19ce Rewrite dd to use phases and half-track steps
Phases will yet be the death of me. THE DEATH OF ME.
2018-03-03 21:29:19 -06:00
Peter Evans f59f5e2d55 Remove colors 2018-03-02 16:43:22 -06:00
Peter Evans 9d585d6ef3 Remove colors 2018-03-02 16:43:00 -06:00
Peter Evans 998a139c00 Use state machine for stepper motor changes 2018-03-02 16:42:22 -06:00
Peter Evans cbf693b186 Stop showing colors from criterion
Vim's command buffer shows them literally, and then I get cranky
2018-03-02 16:41:44 -06:00
Peter Evans c5d1542937 Show correct PC counter in scan 2018-03-01 21:37:10 -06:00
Peter Evans b239cac239 Add dblock command to disassemble blocks of code 2018-03-01 19:31:56 -06:00
Peter Evans 0315eb33bf Better testing for ROL/ROR 2018-03-01 18:31:03 -06:00
Peter Evans 0949661b18 Do a better job testing overflow 2018-03-01 17:24:51 -06:00
Peter Evans f8bda4ebd3 Remove modify_status() function
Also rewrite tests to use macros
2018-02-28 21:40:52 -06:00
Peter Evans 8d0cf264d7 Add missing NZ checks in INC and DEC 2018-02-28 21:34:58 -06:00
Peter Evans 49199eac84 Rewrite status checks with macros
This also forces the result of operations to be considered purely as
8-bit results in _some_ cases, but not in others. We were missing some
times when an overflow is the expected behavior; because SET_RESULT()
and mos6502_modify_status() use ints, this overflow was not properly
observed.
2018-02-28 21:16:39 -06:00
Peter Evans 4baec33e24 We should check status for PLX/PLY 2018-02-28 19:53:26 -06:00
Peter Evans edd175c1f9 Add disasm command (toggle disassembly) 2018-02-26 20:52:13 -06:00
Peter Evans 4558e62adc Use the correct name for the quit command function 2018-02-26 20:46:19 -06:00
Peter Evans 26e2abe745 Test that ASL sets carry 2018-02-26 20:33:52 -06:00
Peter Evans 724dbb1577 Add test to ensure decimal mode is respected for SBC 2018-02-26 20:33:33 -06:00
Peter Evans 0333e308e7 Test decimal mode with ADC 2018-02-26 20:02:58 -06:00
Peter Evans 30c07df9cb When carry is set, subtract one fewer, not one more
A subtle misunderstanding... which led to bizarre and unexpected
behavior elsewhere.
2018-02-26 18:59:25 -06:00
Peter Evans 4b4e58089b Add missing function decls 2018-02-26 18:53:59 -06:00
Peter Evans d1a6441c5a Add missing tests for vm_debug.c 2018-02-26 14:25:02 -06:00
Peter Evans fec8ef0743 Allow $XX hex notation 2018-02-26 14:21:20 -06:00
Peter Evans 5bb76164dc Add missing docblocks for vm_debug.c 2018-02-26 14:10:16 -06:00
Peter Evans 1cec80cead Don't immediately pause 2018-02-26 13:54:32 -06:00
Peter Evans f376f00688 Fix scan test not to rely on buggy operand output 2018-02-25 16:16:14 -06:00
Peter Evans 7b3b30a0f2 Use addr2 for ws tests
I take it back from the previous commit--the test was written with an
assumption that was not how execute() works
2018-02-25 16:14:05 -06:00
Peter Evans 7ad0ad8024 Unbreak current PC in resume; use addr2 in writestate
(Addr1 never worked, so ws was essentially non-functional in practice,
but it passes its tests when you assume execute() does the right thing!)
2018-02-25 16:12:15 -06:00
Peter Evans aa53fdd77e Erase strings before we print anything else
If you print something without an operand, you may end up printing the
last instruction's operand unless you do that wipe
2018-02-25 16:06:27 -06:00