mirror of
https://github.com/bradgrantham/apple2e.git
synced 2025-02-06 11:29:53 +00:00
97 lines
4.5 KiB
Plaintext
97 lines
4.5 KiB
Plaintext
per-scanline modes
|
|
Actual Apple II TEXT/GR and HGR video address patterns are in Understanding the Apple II
|
|
Not for DHGR or 80-col but they're probably just same address twice alternating banks
|
|
tracking clock and reporting video memory contents
|
|
clock
|
|
actual fastest clock is 14.31818MHz
|
|
one tick of ~1MHz clock maps to one tick of address counter
|
|
so is 7 HGR bits or one GR/TEXT horizontal cell
|
|
unsigned long would overflow after 20 minutes
|
|
But could modulo byteclock by 14318180 at interface update
|
|
time and not overflow
|
|
as long as it doesn't take longer than 20 minutes between calls to APPLE2Einterface::iterate
|
|
than 20 minutes...)
|
|
Want current CPU clock count after "cycle()" - map that to 14MHz clocks, can map that to actual wall clock
|
|
"most 6502 cycles are 978 nS long [14 14mhz clocks], but every 65th cycle is 1117 nS long [16 14mhz clocks]."
|
|
So wall clock time is (((clockcount / 65) * 912 + clockcount * 16) / 14318180 seconds) but only starting from 0
|
|
so need seconds from t_phase to t_clocks in clock counts where t_phase != 0
|
|
initially t_phase = 0
|
|
t_elapsed_14mhz = t_clocks * 14 + (t_clocks + t_phase) / 65 * 16
|
|
t = t + t_elapsed_14mhz / 14318180
|
|
t_phase = (t_phase + t_clocks) % 65
|
|
So clk would remain machine clock cycles, but actual wall clock time won't be known until calculated
|
|
Could increment wall clock at clk++ depending on phase, but then probably accumulate error because 14MHz clock rate is so high
|
|
Current CPU clk (in 1MHz CPU cycles) :
|
|
is used to determine to which audio sample (at libAO sample rate) in the audio waveform we should fill
|
|
OK - should work with higher fixed rate
|
|
is used to mark after how many cycles the open apple key should be raised
|
|
checked against clk in
|
|
HM - need to convert to wall clock?
|
|
doesn't need to be that
|
|
address generator
|
|
honor softswitches
|
|
convert byteclock to address
|
|
read empty memory address on bus no longer fails but instead
|
|
generate address, get byte from RAM and return it
|
|
recording softswitch mode changes
|
|
store vector of switch or mode change and byteclock
|
|
instead of setting before APPLE2Einterface::iterate, pass into iterate
|
|
honoring softswitch change in APPLE2Einterface
|
|
initialize scanline mode array to text
|
|
receive vector of tuple of byteclock and modes
|
|
fill scanline mode array from passed in vector
|
|
draw framebuffer by scanline
|
|
|
|
final release:
|
|
help screen
|
|
gamepad calibration screen (for desktop GLFW anyway)
|
|
need to handle asynchronous gamepad arrival (a la HTML5)
|
|
screenshots for README.md
|
|
link to emscripten version
|
|
|
|
emscripten:
|
|
safari misses 'V' for some reason
|
|
why is it running slow in Chrome?
|
|
runs fast in Safari and Firefox. :-/
|
|
upgrade to 1.37, see if -O2 issue is fixed
|
|
audio
|
|
paste somehow
|
|
store paste event contents into a variable, copy that in GLFW clipboard routines?
|
|
floppies
|
|
IDBFS, local storage initialized from DOS 3.3 floppy and other floppies
|
|
copy into IDBFS from other web pages
|
|
drag and drop from IDBFS into floppy icons
|
|
make rasterization less ugly
|
|
retina canvas?
|
|
limit to integer-zoomed pixels?
|
|
GLFW - gamepad using HTML5 gamepad interface
|
|
note that it doesn't show up until initially used
|
|
|
|
cleanup:
|
|
deglobalize where possible
|
|
lower and underscores throughout
|
|
exceptions?
|
|
tableize 6502?
|
|
|
|
Run this software, purge fake6502:
|
|
ProDOS
|
|
LodeRunner
|
|
ChopLifter
|
|
Digitizer
|
|
Plasmania
|
|
Christmas Carols
|
|
Data Capture //e
|
|
Contiki no network
|
|
Idiom Translator
|
|
Pascal - Brad's Disk
|
|
...?
|
|
|
|
apple2e -diskII diskII.c600.c67f.bin ~/Downloads/LodeRunner.dsk none apple2e.rom < /dev/null
|
|
|
|
Actual ROM files that are in our Apple IIe, and run Brad's sound digitizer:
|
|
wget http://www.applelogic.org/files/3420135A.BIN
|
|
wget http://www.applelogic.org/files/3420134A.bin
|
|
cat 3420135A.BIN 3420134A.bin > apple2e_a.rom
|
|
(dd if=/dev/zero bs=16384 count=1 ; cat 3420135A.BIN 3420134A.bin) > apple2e_a.rom
|
|
apple2e -diskII diskII.c600.c67f.bin ~/packages/Disk\ Images/Brad\'s\ Handwriting/Sound\ Digitizer\ Original\ 1.2.dsk none apple2e_a.rom
|