Commit Graph

182 Commits

Author SHA1 Message Date
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
114af20792 fix hgr scanout addresses, modulo 0x2000 2018-07-31 14:51:51 -07:00
Brad Grantham
9d5d4b4a35 initial floating bus implementation 2018-07-31 14:31:36 -07:00
Brad Grantham
bdcf50f890 implement 0xB2, LDA(zp) 2018-07-31 13:42:09 -07:00
Brad Grantham
992864d5a0 remove debug print for $6000 2018-07-31 12:09:35 -07:00
Brad Grantham
6f92ffa096 add ADC(zpg) 2018-07-31 12:07:42 -07:00
Brad Grantham
ea3930a8f0 change clock to be 14mhz, variable for CPU 2018-07-30 16:01:39 -07:00
Brad Grantham
064a9704d6 add some thoughts about clock 2018-07-30 11:18:57 -07:00
Brad Grantham
3bf5f5ed6a Default to TEXT 2018-07-28 12:31:50 -07:00
Brad Grantham
c3adb3abe6 add INC, DEC, and STA (zpg) 2018-07-28 02:50:09 -07:00
Brad Grantham
471fdffcf5 add test program for #23 2018-07-20 20:31:32 -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
72134f94dd update to current codebase 2018-07-20 19:44:19 -07:00
Brad Grantham
17488ca7f7 send left-arrow by default when pressing backspace (delete) 2018-07-20 19:37:49 -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
6745843b0c improve text-only interface
Reposition cursor to top before redraw, so textport updates don't jump

Fix keyboard so tty lower-case key is transmitted as correct key
  code (upper case and let apple2e.cpp handle conversion)
2018-06-08 10:01:03 -07:00
Brad Grantham
b925142da1 add utilities to turn bitmap to code 2018-06-06 12:15:58 -07:00
Brad Grantham
e47cb00e40 add floppy bitmap text files 2018-06-06 12:15:01 -07:00
Brad Grantham
d0e4c7b670 add Apple 2 integer basic ROM (original ROMs) 2018-06-06 12:14:26 -07:00
Brad Grantham
249a057f2d add text-only interface source 2018-06-06 12:13:30 -07:00
Brad Grantham
41d7a42a3c update notes regarding ROMs from our Apple ][e 2018-06-05 17:44:11 -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
1e9362b52c Notes checkpoint 2017-01-08 09:49:42 -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
Brad Grantham
49f098f6dc Add counts and grapher for instruction progress
instructions_by_first_appearance_clock.csv is emitted from branch
"cpu_progression".  It contains the number of instructions processed
before the first time a particular instruction was encountered.

graph_cycles_before_new_insn.py emits an ASCII graph from that data,
linear or algorithmic depending on variable in the source.
2017-01-05 15:19:40 -08:00
Brad Grantham
2e7f809bc9 Fix compile errors caused by moving to range for 2017-01-04 22:09:31 -08:00
Brad Grantham
c981363b4d AO test file 2017-01-03 10:09:18 -08:00
Brad Grantham
30ec998252 Use range-for on containers 2017-01-03 09:41:38 -08:00
Brad Grantham
453c90d4cf Fix buffer underrun in audio code 2017-01-02 12:02:44 -08:00
Brad Grantham
cb60985ef0 Move audio implementation into interface.cpp
Move all libao operation into interface.cpp
This should have the result of removing all AV and GUI code from apple2e.cpp
OS code remaining in apple2e.cpp should basically be only file I/O, console I/O, and chrono.
2016-12-26 22:28:45 -08:00
Brad Grantham
bf7961855f Reduce OpenGL texture download overhead a touch
Store all text and hgr writes in write() in a map.
Later, in apply_writes(), actually download all writes from the map.
This has the effect of downloading only the most recent write.
After implementation, this has the effect in FAST mode on my Mac of only reducing writes by between 0% and 4% in both QUADRADOODLE and LodeRunner.  So probably not worth it.  But maybe worth an interation on this which would mark rows and try to coalesce adjacent writes in X and Y to single texture updates.
2016-12-26 02:00:09 -08:00
Brad Grantham
8817b799b6 Make Lemmings start up (but wrong Lemmings...)
Implement EOR zpg,X
Implement ROL zpg,X (Thanks, Bart and Dad!)
2016-12-26 01:34:57 -08:00
Brad Grantham
4bd25b0cc1 Fixes formatting 2016-12-14 16:53:57 -08:00
Brad Grantham
702f0749f0 Add usage examples 2016-12-14 16:52:54 -08:00
Brad Grantham
33314406c0 use my CPU 2016-12-09 13:06:50 -08:00