Commit Graph
100 Commits
Author SHA1 Message Date
Peter Evans da4a82d8cf The disasm command now always sets disasm = true
We should probably just not even offer this as an option in the debugger
then.
2018-04-13 23:35:59 -05:00
Peter Evans 3834c1e112 The debug_break check was moved outside of the mos6502_execute function 2018-04-13 23:34:28 -05:00
Peter Evans 04e72486f1 We need to account for the track self-sync 2018-04-13 23:31:53 -05:00
Peter Evans 55287b4cb0 Reorganizing test files 2018-04-13 19:09:23 -05:00
Peter Evans a43fe0d38e Modify test files to account for reorg 2018-04-13 18:36:02 -05:00
Peter Evans 5db0c3b9c0 Clearer documentation on push_stack 2018-04-13 18:01:17 -05:00
Peter Evans 3887f52119 Clarify behavior of pop_stack 2018-04-13 16:22:58 -05:00
Peter Evans ebb5f068fd Always set the UNUSED and BREAK flags after execution.
This change simply replicates the behavior demonstrated in AppleWin.
2018-04-13 16:17:13 -05:00
Peter Evans 5730e5e446 Add explicit definition of unused bit 2018-04-13 16:15:12 -05:00
Peter Evans 20047c65a8 If we pressed a key, we need to set the strobe to true 2018-04-13 16:14:57 -05:00
Peter Evans ee2c9746c6 Add docblocks 2018-04-07 19:54:05 -05:00
Peter Evans 6e77e99813 Add ability to debug separate from pausing
Also, pausing just pauses now; no debugger prompt is shown. ALT+P
toggles pausing, so just hit it again to unpause. Also, when things are
paused, you can perform other keyboard events (like quitting).
2018-04-07 11:14:12 -05:00
Peter Evans ec719da2c5 Remove unused vm_reflect files 2018-04-07 11:05:26 -05:00
Peter Evans 4b0b8e1a89 Move vm_debug fully into apple2 2018-04-07 00:53:17 -05:00
Peter Evans 27d0a15bc5 Move vm_debug_broke() check out of mos6502 and into apple2 2018-04-07 00:48:16 -05:00
Peter Evans 18e0bde099 Remove vm_reflect.c 2018-04-07 00:39:49 -05:00
Peter Evans c665df3531 Move reflect to event 2018-04-07 00:33:40 -05:00
Peter Evans 8a899f87a2 Move reflect files to event files 2018-04-07 00:32:29 -05:00
Peter Evans a913668c02 Missing some reorg changes; move reflect into event, debug 2018-04-07 00:26:31 -05:00
Peter Evans 74aafb0d01 Reorganizing files into directories 2018-04-06 20:27:47 -05:00
Peter Evans f9d130ba97 Add an extremely crude method to slow things down
It's not configurable, and not accurate to any particular measure. But
it's something for now.
2018-04-06 11:49:54 -05:00
Peter Evans 281544bf43 Avoid polling for events until we're ready for a frame redraw
This change drastically cuts the number of times we poll for events, and
consequently drastically speeds up the number of frames we can draw
within any given span of time.

In other words, we go from "this barely moves as fast as the actual
Apple II" to "holy shit this moves so fast".
2018-04-06 11:47:54 -05:00
Peter Evans f8dd49e892 Revert "Separate window and renderer creation; use software rendering"
This reverts commit c178e417b7.
2018-04-05 20:57:09 -05:00
Peter Evans 206bd86196 Revert "Move hires colors into include file"
This reverts commit d8e0159de0.
2018-04-05 20:56:59 -05:00
Peter Evans e50af5aba9 Revert "Implement rect change stack"
This reverts commit 616bfdcc58.
2018-04-05 20:56:46 -05:00
Peter Evans 616bfdcc58 Implement rect change stack 2018-04-04 22:01:46 -05:00
Peter Evans d8e0159de0 Move hires colors into include file 2018-04-04 22:01:26 -05:00
Peter Evans c178e417b7 Separate window and renderer creation; use software rendering
It seems _slightly_ faster than hardware acceleration for the uses we
have.
2018-04-02 08:37:01 -05:00
Peter Evans 2d0952133a Add missing docblock comments, remove some dead code 2018-03-31 21:10:08 -05:00
Peter Evans 418950750f A very rough version of the correct hires render logic 2018-03-31 20:54:47 -05:00
Peter Evans 221d798c82 Remove online checks
That doesn't seem to be how the motor on/off status works. This
basically stops the motor from actively spinning, but it does not
prevent the drive from basic operation.
2018-03-30 23:33:30 -05:00
Peter Evans 2b8cdc7cfc Remove logging, always work on a drive in switch_drive 2018-03-30 23:05:24 -05:00
Peter Evans 6653da3c20 Rework overflow logic, and add missing handling 2018-03-30 23:04:21 -05:00
Peter Evans 0ccabda71e Rewrite SBC logic
The carry handling was incorrect; carry is set if we went below zero,
but bit 7 is not enough to determine that. It follows that negative
handling needed to be modified accordingly. Overflow handling was also
incorrect.
2018-03-30 20:07:24 -05:00
Peter Evans 07a8a385f5 Remove log statements 2018-03-30 20:06:59 -05:00
Peter Evans 54708e5110 Switch back to >= 2018-03-30 18:49:32 -05:00
Peter Evans a23c7321f5 Don't do certain operations if the drive is offline 2018-03-30 16:26:24 -05:00
Peter Evans d129ffed99 Logging on STA instructions 2018-03-30 16:10:15 -05:00
Peter Evans 523b9c4a03 Several changes...
1. We have much more logging.
2. We were not properly turning off drives when we would get called with
   C0x8.
3. We now roll over sector pos if we are greater than ENC_ETRACK.
4. We now reset sector pos when we step.
2018-03-30 16:07:58 -05:00
Peter Evans d2047457e9 Use log_crit() instead of log_critical()
This change also removes the former log_critical and log_error macros.
2018-03-29 21:45:25 -05:00
Peter Evans 7ca099d0d0 Open log file rather than use stdout 2018-03-29 21:42:38 -05:00
Peter Evans 20d33ef464 Change to erc.log
emp is a much older name for the program
2018-03-29 21:40:11 -05:00
Peter Evans 89a0f34ebe Add suite of log functions that map to syslog RFC levels 2018-03-29 21:39:13 -05:00
Peter Evans 5d55d5b258 Use a bitwise-and to determine carry
A bitwise-and is what we do in most (all?) other cases; it's a bit
jarring to read the current logic.
2018-03-26 23:10:57 -05:00
Peter Evans 8aef335f25 Remove unnecessary zero page code
This is handled in the zp_read/write functions in apple2.mem.c
2018-03-26 20:59:24 -05:00
Peter Evans d9be1d6ab2 We need to return from aux, or write to aux, immediately
If we wait until later in the function, we may get caught up in the
check for ROM.
2018-03-26 20:51:10 -05:00
Peter Evans 92ac77e8f5 Sort read switches 2018-03-26 20:48:13 -05:00
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