Releases: mtg101/Open-Borders
Sine Scripted
Sine wave text effect is now scriptable!
This is a nice milestone for me: border fx check! SMC check! sine wave check!
Sine Waves
This is a snapshot version where I got the text going all sine wavey.
It took me a long time to debug this. I learnt lots about LUT maths in the end.
Plus can't do all the sine wave maths in one frame - had to split it.
Which then meant moving around the main frame routines a bit.
Now just need to add the sine fx on/off to the script...
Full colour palette and EXX stripe tricks
Realised I can use the undocumented OUT (C), 0 opcode to set border black. Wouldn't work on CMOS hardware apparently (it does OUT (C), 255 apparently, whatever that does...) but those were mostly the 128k models - fine for my 48k demo (at least in the emulator!).
So don't have to waste a register on black, and easy to reset back to black after top border.
Also can technically use OUT (C), C for yellow - it's just also setting MIC / EAR bits and causes noise (even if I try and always have those bits on for any colour - plus OUT (C), 0 would always break this).
So technically all 8 colours!
Plus I used some of the spare NOPs at the end of each row to flip registers for the next row with EXX and EX AF, AF' - allowing every other row to change colour palette, for stripes or blended colours. Added a new FX in addition to simply setting the colour to runs it on and off - so not just SMC changing which register, but actually changing to opcodes!
So now my scrolling text starts as solid colour, then changes to per-row-stripey, along with a nice glitch!
Colours and a glitch!
Have a script for each characters effect now - well just which colours for now.
But while doing that discovered an out-of-bounds colour happened to make a cool glitch - so found the glitch value and added it to the colour table!
It works!
All but the SMC...
In theory I've got scrolling text in a buffer and I just need to add the Self-Modifying Code to show it in the border...
In reality all that's untested, so I'll start with learning SMC, then hook it up, then debug...
For now this release shows the stripe top border, static main screen, and all the animation code going on during the screen draw, keeping the border timing static.
Basic Timings
Have got the basic timings down to show static stripes in the top border.
Uses full range of registers to give palette of 7 colours.