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 c178e417b749035bc16aee048f15bb396462cb24.
2018-04-05 20:57:09 -05:00
Peter Evans
e50af5aba9
Revert "Implement rect change stack"
...
This reverts commit 616bfdcc58b9672cd14b3455cb0edeefd8125a53.
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
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
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
82906e74f8
Decrease frame rate per second
2018-03-18 00:01:40 -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
d5450bf743
Refresh once every 30th of a second
...
*Roughly...
2018-03-07 00:20:27 -06:00
Peter Evans
92ee67c8d8
Allow us to signal that we should exit
2018-02-05 00:35:04 -06:00
Peter Evans
72c4111458
Add event system; move event code into vm_event.c
2018-02-05 00:28:22 -06:00
Peter Evans
c010c10ce2
Add missing docblocks
2018-02-03 17:46:56 -06:00
Peter Evans
2ae272af3a
Stop flickering issue by clearing before drawing
2018-01-24 20:04:53 -06:00
Peter Evans
cfee8baf25
Refresh once every thirtieth of a second
...
And also refresh on keypress
2018-01-23 23:14:26 -06:00
Peter Evans
8f516db42b
Remove arbitrary counter and allow escape to exit
2018-01-23 15:04:11 -06:00
Peter Evans
775a145480
Rework screen display logic for more efficiency
2018-01-23 14:52:16 -06:00
Peter Evans
b5e1e09a35
Bump up counter by a ton
2018-01-22 21:43:18 -06:00
Peter Evans
2f777ce881
Several core changes to status, soft switches
...
Regarding soft switches, we had several we should have been listening
for on both reads and writes, but were only doing so on writes; this is
now fixed.
Regarding statuses, we were incorrectly calculating both carry and
overflow. This should now be fixed, although some quick examinations of
disassembly output suggest there is something else amiss. Debugging will
continue shortly.
2018-01-20 21:01:26 -06:00
Peter Evans
e286ba34f5
Greatly increase counter
2018-01-18 22:19:31 -06:00
Peter Evans
0ae4f041e5
Increase counter amount
2018-01-18 16:21:56 -06:00
Peter Evans
37df8db225
Initiate last_key and key_pressed with default values
2018-01-17 15:28:23 -06:00
Peter Evans
bf529d6c9b
Finish map, mapper handling for keyboard events
...
We still need to revise the test code we currently have for handling
keyboard functions; I imagine some code will need to be removed.
2018-01-17 01:07:31 -06:00
Peter Evans
b1177784a0
Allow access to the last key pressed and key_pressed status
2018-01-16 23:42:10 -06:00
Peter Evans
6cbcf0f9ab
Increase the counter to see more ops running
2018-01-14 22:31:10 -06:00
Peter Evans
f7b8740c2e
Let the CPU run for longer before it dies
2018-01-08 22:24:30 -06:00
Peter Evans
b2add9c3de
Move vm_area logic into its own file
2018-01-07 20:05:02 -06:00
Peter Evans
1c36c4ea4d
Add missing docblock comments
2018-01-07 16:07:29 -06:00
Peter Evans
7ceee608b3
Stop delaying by 2 seconds
2018-01-05 15:52:04 -06:00
Peter Evans
6a230341e1
Make vm_area_set be an inline function.
...
Gets most of the benefits of being a macro, but also gains type safety
(which macros do not have).
2017-12-27 17:10:51 -06:00
Peter Evans
30223e0bca
Remove screen area field; document area fields
2017-12-27 16:59:56 -06:00
Peter Evans
efb8f04555
Use vm_area for draw_rect.
...
This simplifies and to some degree normalizes the way we reference areas
in the vm subsystem.
2017-12-27 16:42:30 -06:00
Peter Evans
c7b830bb4a
Switch references from SDL_Rect to vm_area
...
We still use SDL_Rect internally, but we want to abstract the use of it
in our API. The only thing the rest of the app should care about is the
vm_area struct.
2017-12-27 16:31:02 -06:00
Peter Evans
76191991c8
Add a lot of missing documentation
2017-12-27 01:14:52 -06:00
Peter Evans
8146687110
Don't create a window when testing
...
We do this by creating the notion of a "headless" mode, and skip window
creation in SDL.
2017-12-26 17:06:08 -06:00
Peter Evans
b2c1bd9e6d
Hello world, in rendered text; use nearest pixel sampling
...
The scale change removes some blurriness that we saw when copying pixels
from the bitmap font into the renderer.
2017-12-22 12:56:22 -06:00
Peter Evans
b1c146c62d
Add ability to set logical size of window at any time
...
We also removed the scale field, as the screen does not expect to manage
its own logical coordinates in SDL.
Additionally, we added an xcoords and ycoords function to the screen
externs so that you don't have to "know" that screen has those as
fields.
2017-12-20 16:44:24 -06:00
Peter Evans
05a641c8f6
Use SDL's render logical size feature
...
This allows us to work with the pure x/y coordinate system we set when
creating the vm_screen. SDL will take care of the translation of those
coordinates to whatever the window size is.
2017-12-18 14:32:15 -06:00
Peter Evans
4ef9e50792
Really basic implementation of SDL2.
...
Plus a crappy rectangle to prove that our vm screen code is working in
principle. (It will be removed shortly.)
2017-12-17 23:31:56 -06:00
Peter Evans
ad37d59b2d
Remove references to OpenGL/GLFW/GLEW
2017-12-17 20:20:11 -06:00
Peter Evans
afa07e346f
A few comments
2017-12-17 19:22:33 -06:00
Peter Evans
83dcfaf646
Add glew, defines for width/height
2017-12-17 19:09:54 -06:00
Peter Evans
a73c15c37c
Rename vm_screen_context to vm_screen
2017-12-17 16:42:05 -06:00
Peter Evans
8beb761535
Actually show a window.
...
This is also the beginning outline of how we want to abstract graphics
away in erc.
2017-12-16 23:38:59 -06:00
Peter Evans
b646bfc511
First stab at adding graphics.
...
This involves using glfw. This first commit creates a window but doesn't
do anything with it; it also just hangs until you can escape out
somehow.
2017-12-16 22:45:39 -06:00
Peter Evans
0336fe7366
Documentation for files
2017-12-08 22:12:31 -06:00
Peter Evans
8cd9c5ffab
Documentation, lacking
2017-12-06 21:25:47 -06:00
Peter Evans
3cebed2377
Adding all of the instruction files
2017-12-02 13:05:53 -06:00
Peter Evans
237d5e3cb6
First commit
2017-11-21 23:24:51 -06:00