1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-27 20:51:17 +00:00
Commit Graph

168 Commits

Author SHA1 Message Date
Peter Evans
7b19279f1d No need for this comment any longer 2017-12-22 20:45:26 -06:00
Peter Evans
4ad690212f Blank out the space we want to render a character 2017-12-22 17:49:36 -06:00
Peter Evans
29652b2368 Implement draw text functionality 2017-12-22 15:48:48 -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
979ca65f43 Add bitmap font to apple2, remove rectangle draw 2017-12-21 23:33:04 -06:00
Peter Evans
adac6346e8 Add color mode, text video modes 2017-12-21 11:52:56 -06:00
Peter Evans
87b67216b0 Default to lo-res mode 2017-12-20 21:54:54 -06:00
Peter Evans
23e113e72a Add video mode switcher to handle logical sizes 2017-12-20 21:52:28 -06:00
Peter Evans
7d62548248 Add the bones of the draw functions and file 2017-12-20 21:33:15 -06:00
Peter Evans
f55b608bee Move screen run logic into apple run_loop and create 2017-12-20 20:45:26 -06:00
Peter Evans
8c23f3fa7e Switch window sizes for 4.375:3 2017-12-20 19:32:54 -06:00
Peter Evans
53db99f4fd Use size options for window 2017-12-20 17:08:19 -06:00
Peter Evans
609e3eea7c Add size option, functions to get width and height 2017-12-20 17:06:03 -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
f31fcd9c37 Add support for vm_bitfont 2017-12-19 21:50:50 -06:00
Peter Evans
aefe74cae4 Use BMP format, since SDL can load it natively.
(Vs. needing to install SDL_image just for the font files.)
2017-12-19 16:13:04 -06:00
Peter Evans
aad60fa629 Oh, lord, I included my random natterings 2017-12-19 15:35:10 -06:00
Peter Evans
6db322ae5c I wrote a tool to build fonts from grid files.
This commit also adds the first such output, which is the apple II
system font.
2017-12-19 15:28:42 -06:00
Peter Evans
28cd93d5e9 Do static analysis if env variable is set 2017-12-19 01:02:48 -06:00
Peter Evans
dfbe0750ae In which I spent an evening plotting a bitmap font
The idea here is to eventually write something that can convert these
(very simple to edit) grid files into an image file which we can then
read parts from and copy onto the screen.

This is also a template for how we can implement other default typefaces
that may come with other platforms we may wish to emulate (for example,
C64).
2017-12-19 00:48:06 -06:00
Peter Evans
c84f194c8b Get our test suite working with SDL
Had to remove a couple of screen tests for now; it needs a big re-think
now that we're using SDL. Namely, how do we test SDL?
2017-12-18 14:46:40 -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
f3966dc010 Enable static analysis through clang
If you want to, just uncomment the line that adds the --analyze flag to
CMAKE_C_FLAGS.
2017-12-18 14:26:53 -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
294fab76aa Add boot function; modify main to use apple2 boot 2017-12-15 22:22:40 -06:00
Peter Evans
3f3210205f We missed the size multiplier for memset()
In doing so, only a small portion of memory would have reliably been set
to zero; specifically, just the first element!

This change should resolve some intermittent test failures to guarantee
that all memory be zeroed.
2017-12-15 21:22:22 -06:00
Peter Evans
ed1a7b3278 Rename to read/write (without byte) 2017-12-15 21:03:38 -06:00
Peter Evans
047d9eabd0 Add tests for read/write 2017-12-15 21:01:49 -06:00
Peter Evans
4cc79b1ba8 Add 140k, 240k, decls for read/write 2017-12-15 21:01:15 -06:00
Peter Evans
b07848dd9d Change name; move 140k, 240k 2017-12-15 21:00:59 -06:00
Peter Evans
9c646435c5 Add bad image file for testing 2017-12-15 16:53:22 -06:00
Peter Evans
223edd14fe Add shift test 2017-12-15 16:53:12 -06:00
Peter Evans
06c8d623e7 Move MAX_SECTOR_POS and change shift into a while loop 2017-12-15 16:52:47 -06:00
Peter Evans
c5c010699c Move MAX_SECTOR_POS into header file 2017-12-15 16:52:35 -06:00
Peter Evans
0c82a58f79 Add ERR_BADFILE 2017-12-15 16:52:26 -06:00
Peter Evans
eae302e686 Add eject, insert tests 2017-12-15 16:46:40 -06:00
Peter Evans
a034408f03 Add headers for insert, shift 2017-12-15 16:46:22 -06:00
Peter Evans
079a35507c A number of updates in heavy dev phase
1. Add an insert function (to insert a new disk).
2. Add a new shift function to coordinate sector position updates when
reading or writing.
2017-12-15 16:45:20 -06:00
Peter Evans
256e0cf1d6 Don't write to the log stream if null
This prevents a somewhat vexing crash condition from happening.
2017-12-15 16:28:14 -06:00
Peter Evans
7811f4da44 No, use actual zero bytes
Forgot the ol' backslash in the script I wrote to make this file
2017-12-15 14:39:57 -06:00
Peter Evans
9689d984bc Add data directory, image file with all zeroes 2017-12-14 23:22:10 -06:00
Peter Evans
a48bc05bd0 Further testing 2017-12-14 23:09:32 -06:00
Peter Evans
e84b79819b Allow position function to be globally visible 2017-12-14 23:08:50 -06:00
Peter Evans
4dffea1dda Make position non-static; add case for NULL data 2017-12-14 23:08:33 -06:00