Commit Graph

90 Commits

Author SHA1 Message Date
Brad Grantham d3770cfc71 don't report joysticks on stderr 2021-01-11 20:25:39 -08:00
Brad Grantham e55025e615 implement DHGR 2021-01-02 16:25:05 -08:00
Brad Grantham 2e095b24f6 read colors from generated palette; checkpoint DHGR work 2021-01-02 09:45:49 -08:00
Brad Grantham 3d05ad75c5 Add colors calculated from YIQ and artifacting 2021-01-02 07:53:19 -08:00
Brad Grantham 3c1b43f2ad use more well-defined int types 2020-12-16 23:03:43 -08:00
Brad Grantham ba52591064 display speed 2020-12-11 22:01:21 -08:00
Brad Grantham c81a6a8dce Apply some fixes from Rocinante port
More const on char*s
Remove virtual from MAINboard read and write and just call them directly
Move up regions slightly so they might perform better
2020-12-05 17:19:21 -08:00
Brad Grantham ef922fa355 fix steady slowdown 2020-01-20 23:11:39 -08:00
Brad Grantham 0a9399d646 use raw string literals 2020-01-11 18:20:27 -08:00
Brad Grantham b76c734115 set env var PROBE_JOYSTICKS to probe axes and buttons 2019-10-15 10:37:18 -07:00
Brad Grantham 216f74cc32 print only active axes and buttons in probe 2019-10-15 09:29:25 -07:00
Brad Grantham 687e80e16e delete vertex array on recreation, comment out speed 2019-02-18 19:39:32 -08:00
Brad Grantham fd1e15a595 add clock text box 2019-02-18 08:11:22 -08:00
Brad Grantham a04b9aaf87 set the default as no joysticks 2019-02-13 23:14:22 -08:00
Brad Grantham 6e04af2752 make run on Linux 2019-02-10 20:30:22 -08:00
Brad Grantham fc795a4a33 make GL utilities have better name 2018-10-15 21:11:17 -07:00
Brad Grantham a9e48a509a initial breakout of UI widget classes 2018-10-15 21:09:51 -07:00
Brad Grantham 420f016098 extract program compilation and rect v array buffer 2018-10-14 12:49:58 -07:00
Brad Grantham f2b28839e4 separate out opengl_texture 2018-10-14 12:10:31 -07:00
Brad Grantham bb30c33d2d start separating out GL into modules 2018-10-14 12:07:05 -07:00
Lawrence Kesteloot 9f2667d93f Disable dithering on GIF write. 2018-08-08 16:45:41 -07:00
Brad Grantham 2c437b27da record at 50ms simulation per frame
Change bare "5" to more descriptive "recording_frame_duration_hundredths".

Create APPLE2Einterface events that allow interface to limit main loop speed.

Implement rate limiting on start_record and release limiting on stop_record.

During recording, simulation will not run at clock rate.
2018-08-08 16:18:16 -07:00
Brad Grantham 6028d62786 scale GIF output to 2x screen size 2018-08-08 15:46:41 -07:00
Brad Grantham 6caca1ec5d fix stop_recording 2018-08-08 15:45:15 -07:00
Brad Grantham dddd18c258 Partially implement animated GIF
This uses the update rate of OpenGL swapbuffers, but should clock frames by 50ms.

This is 1x sized.  Needs to be 2x sized.
2018-08-08 15:24:38 -07:00
Lawrence Kesteloot a2a13e24dc Start GIF-recording mode. 2018-08-07 23:33:14 -07:00
Brad Grantham 043429311a fix crash if text is dragged from Chrome
If the drag-and-dropped filename has no leading "/", assume it is
drag-and-dropped text.  This matches the behavior of Chrome on Ubuntu,
for which dragging selected text onto GLFW is passed to the file drop
callback.

If the dragged selected text starts with "/", the drop callback will
still attempt to open it as a filename.
2018-08-06 00:15:58 -07:00
Brad Grantham 347c2d4ddb remove warning on unused result of fread by using the result 2018-08-06 00:15:58 -07:00
Brad Grantham 1cfc30e904 use correct default page 2018-08-03 01:46:57 -07:00
Brad Grantham eaffc29115 fix regular mode changes, disable prints 2018-08-01 11:26:49 -07:00
Brad Grantham 0cdabd22ad initial split mode implementation 2018-08-01 10:28:43 -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 9d5d4b4a35 initial floating bus implementation 2018-07-31 14:31:36 -07:00
Brad Grantham 94e1fc1c6d fix #23 by added fudge to texture sample
Another case sampling the wrong location fixed by adding vec2(.01, .01)...
2018-07-20 20:28:16 -07:00
Brad Grantham a9aefa583a fix #25, terminate the pasted string with NUL
Allocate one more byte, and append a '\0'.

Whoops.
2018-07-20 20:21:57 -07:00
Brad Grantham e9ac6136f8 fix #3, add .01 texel to texture sampling
Not sure why that works, need to look at texture coordinates...
2018-07-20 18:58:40 -07:00
Brad Grantham 93b1f14cee temporarily hack textport shader to work 2018-07-20 18:44:10 -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 4e4c9e5a48 Change some tuples to pairs and typedef for readability
Change every get_min_dimensions to return "width_height", which is
hopefully obviously a pair containing a width and height.

Change tuples in the writes map to "address_auxpage", which is
maybe a more descriptive type of a pair containing an address and an
aux page.

Inspired by http://maintainablecode.logdown.com/posts/158531-stdpair-considered-harmful
    I kind of cheated - I used std::pairs but gave them descriptive typedefs.
2017-01-18 16:48:00 -08:00
Brad Grantham 0075ee6b3f Change text and lores shaders from R8UI to RED
Last of the INTEGER textures.

Scale values up from textport so they can be interpreted as byte values.
2017-01-07 15:51:02 -08:00
Brad Grantham 6de05cefb2 Move font texture from R8UI to RED 2017-01-07 15:42:11 -08:00
Brad Grantham 7570a1c842 Move image and hires textures from R8UI to RED
Rename initialize_texture to initialize_texture_integer.

New function initialize_texture that loads a GL_RED texture, and
use it for hires and image shaders.

Don't scale texture values back to 0.0-1.0 in image and hires shaders.
2017-01-07 15:38:54 -08:00
Brad Grantham 7ce091c23e Remove some unnecessary subtrations of 0 2017-01-07 15:27:41 -08:00
Brad Grantham 4460274b75 Fix hires color shader 2017-01-07 15:13:30 -08:00
Brad Grantham be750dfac4 Use 2D for hires, images textures; not RECTANGLE
Rename "texture" to "opengl_texture" for a touch more readability
and less ambiguity.

Switch hires and image textures to "opengl_texture".

Use coordinate scale for image textures and hires textures in shaders
and pass in as Uniforms
2017-01-07 14:51:29 -08:00
Brad Grantham 4a3dc4a9b7 Fix broken 80-column text 2017-01-07 14:35:00 -08:00
Brad Grantham 3863010d07 Move textport textures from RECTANGLE to 2D
Change initialize_texture to return an object containing width and
height, since the GUI uses textport textures of various sizes.

Add scale factors to text, text80, and lores shaders and set them as Uniforms.
2017-01-07 14:00:46 -08:00
Brad Grantham c9113ece86 Change font texture from RECTANGLE to 2D
Make new texture function for making 2D textures instead of RECTANGLE
textures.

Pass in scale factor from texel coordinates to UV coordinates.

Change text and text80 fragment shaders to scale texel coordinates
to UV for sampler for font_texture.

Use sampler2D instead of sampler2DRect for font_texture
2017-01-07 13:32:35 -08:00