Commit Graph

32 Commits

Author SHA1 Message Date
Shamus Hammons c970c23a2e Added initial emulator configuration window, cleanup of settings code.
The settings code now actually saves updated settings to the config
file.  Also wrote the beginnings of a proper Config window, and a few
of the options actually work (which ones work is left as an exercise
for the reader).
2019-04-16 22:29:58 -05:00
Shamus Hammons 719cbb7a23 Added Apple II/IIe firmware, fixed HD write emulation. 2019-02-25 22:06:55 -06:00
Shamus Hammons 63762cef81 Added WOZ 2 support.
It will read/write WOZ 2, though internally it doesn't obey the "optimal
bit timing" value yet; support for that is coming.  :-)  It will also
silently upconvert WOZ 1 images, though that will only matter if the
disk is writable and is written to.
2019-02-09 15:42:07 -06:00
Shamus Hammons 31d2453ee7 Fixed disk emulation to handle quarter track seeking.
It's not very accurate as it's set to zap the head instantly to where
the phase solenoids indicate, as opposed to moving from the start
position to the destination position in a finite amount of time (which
wouldn't be all that difficult to emulate).  But most things tend to be
pretty well behaved and so this approach seems to work OK.

Also added preliminary hard disk emulation.
2019-02-07 07:46:21 -06:00
Shamus Hammons 66a747c7d9 Misc. improvements, added WOZ file support to floppy emulation
- Refactored old MMU slot code to be more flexible
- Moved all Mockingboard related code to its own compilation unit
- Refactored old 6522 & AY-3-8910 code into v6522VIA & vAY8910  :-)
- Fixed BCD mode for ADC and SBC in v65C02
- Finally fixed text mode characters in both ALTCHARSET and regular
  modes
- Added new floppy disk controller Logic State Sequencer emulation
- Fixed v65C02 to be cycle exact (as far as I can tell)
- Fixed a bunch of bugs in v65C02
- Dropped NIB support
- Added WOZ 1.0 file support

That last item is a bit of a big deal, as I had been thinking about
writing a new file format that would be bit-based--since the NIB nybble
format, while better than pretty much all the other formats out there,
fails hard in things like extra sync bits and half tracks.  So, somewhat
serendipitously, I stumbled upon the Applesauce project and found out
that not only had other people been thinking in more or less the same
direction, they had created it and had made disk images to try!

So now, because of this, WOZ is the internal format used by the floppy
emulation (as opposed to NIB) which, along with the new disk Logic State
Sequencer emulator, makes it possible to format floppy disks correctly
for the first time.  :-)

One ironic consequence of this is that NIB format can no longer be
properly supported.  The irony comes from the fact that before there was
LSS emulation, NIB was the most accurate format you could get to
represent the low level format of a disk, but now, with proper LSS
emulation, it's the worst format for representing a floppy disk.  And
the main reason for this is that NIB doesn't contain sync bits, and has
no mechanism to represent them--so when feeding them to the new LSS
emulation, they will fail horribly because without sync bits, the
bitstream represented by a NIB formatted disk can and will be
misinterpreted by the LSS.  And since there is now a format that
properly represents the bitstream on a floppy disk (WOZ), there's
absolutely no reason to keep NIB around or support it anymore.  While it
was a nice interim format to have around (when the emulation of the disk
was "imperfectly perfect"), it now no longer has a place in disk
preservation and/or emulation.

Another consequence of this new format is that Apple2 only supports
writing of WOZ images--it will no longer support writing of DSK and its
bretheren.  However, since those formats are extremely limited in their
scope (they literally only represented the contents of the sectors on a
disk) we still support reading them; Apple2 will automagically upconvert
them and save them as WOZs (it will use the same filename but substitute
"woz" for the old extension).  So if you're wondering why your DSKs are
unchanged when saving to them, you now know why.  :-)

Big, big thanks to the Applesauce guys and everyone who contributed and
continues to contribute to that project; your efforts are very much
appreciated--you guys are awesome!
2019-01-23 20:33:05 -06:00
Shamus Hammons 6bdd378e27 Conversion of V65C02 to pointers, misc. whitespace cleanups. 2018-09-16 21:45:27 -05:00
Shamus Hammons 92fbd44509 First stab at adding Mockingboard support.
Currently only supports one Mockingboard in slot 4, but it should be
fairly trivial to add another in slot 5.  Tested with Ultima 3, 4 & 5,
and Mockingboard disk #1.  Also, added some fixes to correct the timing
of the 6502 and sound; I believe I have a good understanding of it now,
even though there's still work to do to keep the main CPU thread from
starving the audio thread (which still happens, but less often now).
2018-09-09 22:47:51 -05:00
Shamus Hammons 01d41f5b9d Improvements to timing, disk selector; added Double LoRes.
Having taken a good look at "Understanding the Apple IIe", I've fixed
the timing of one frame now that I know how much time it's supposed to
take. Also added the ability to recurse into subdirectories of the disks
directory, and the ability to page through the disk list when there are
more than three columns of disks. Another thing I did not know about was
Double LoRes, that has been added as well; also, did not know that the
video bus appeared at memory mapped locations that weren't attached to
anything. This quirk is now properly emulated.
2017-06-21 22:57:57 -05:00
Shamus Hammons 978531c95e Fixed keyboard handling, consolidated video handling.
The keyboard handler now properly emulates the //e's 2-key rollover.
However, we might have to add in a key repeat delay if it makes it so
that you can't type on the console anymore. This had to be done because
SDL will throw in key delay if you rely on it's SDL_KEYDOWN message and
this caused many games with keyboard input to be unplayable. Also, we
consolidated the video handling files, as there was very little in
video.cpp and so we moved it into applevideo.cpp and renamed that file
to video.cpp. Things are a lot cleaner as a result of this merge. :-)
2017-06-04 22:28:52 -05:00
Shamus Hammons 717eaa2219 Miscellaneous minor code cleanup. 2017-06-01 21:42:15 -05:00
Shamus Hammons 721ead373f Misc. cleanups, incl. cleanup up Makefile. 2017-05-17 23:17:17 -05:00
Shamus Hammons b6f06c7cba Added state save/load support. 2014-04-02 13:00:00 -05:00
Shamus Hammons 92c6ae00ea Added application icon. 2014-04-01 11:33:48 -05:00
Shamus Hammons 1e6f6a0ca5 Fixed stupid lockup bug on exit when emulation paused/off. 2014-04-01 08:47:16 -05:00
Shamus Hammons 0574860ec5 Fixed cross-compilation, added more GUI glue. 2014-03-26 08:05:47 -05:00
Shamus Hammons c7beef2408 Removed GUI cruft, added 10 & 12pt fonts. 2014-03-25 10:45:09 -05:00
Shamus Hammons 63741c0714 Removed unnecessary cruft from project. 2014-03-03 10:27:20 -06:00
Shamus Hammons 8789953718 Disk names now display in window, still lots to do. 2013-10-13 21:00:17 -05:00
Shamus Hammons bcfe62d754 Beginnings of disk image selector. 2013-10-13 15:22:19 -05:00
Shamus Hammons dd5438d5a6 Added MXE cross compile script. 2013-10-11 15:10:47 -05:00
Shamus Hammons f36d026c7b Added floppy #2 saving, statistics to makefile. 2013-10-06 12:17:38 -05:00
Shamus Hammons 3a8c0287e8 Created new MMU based code for R/W handling. Should be much faster now. 2013-09-28 18:15:54 -05:00
Shamus Hammons c0bc82a632 Converted to SDL 2, added fullscreen toggle. 2013-09-08 21:18:23 -05:00
Shamus Hammons a6c39ed766 Preliminary workings of a disk handling window. Added element visibility,
fixed bug in text that ignored position in a container.
2009-02-03 04:25:02 +00:00
Shamus Hammons a13cd9b31d More GUI refinements, added "text" control 2009-02-02 15:25:25 +00:00
Shamus Hammons 8f4768bdc1 Minor refactoring on V65C02 core (fixed EA_ABS_* macros), changed sound to
work with signed samples (in preparation for the move to 16-bit signed). Also,
colorized the Makefile for more mirth.
2009-01-19 16:09:37 +00:00
Shamus Hammons 555db5cdcd undo test commit (testing permissions) 2008-10-12 21:02:27 +00:00
Shamus Hammons 30f07acfd0 as 2008-10-12 20:38:36 +00:00
Shamus Hammons 7aa515c769 Undoing changes (accidentally) committed from r31. 2007-05-29 05:16:51 +00:00
Shamus Hammons b90c77b56b Set eol-style to native to keep things sane. 2007-05-29 05:00:36 +00:00
Shamus Hammons ce9f314942 Set eol-style to sane default. 2007-05-29 03:06:33 +00:00
Shamus Hammons eeb2935c12 Moved stuff into trunk (part 2)... 2007-05-29 02:37:11 +00:00