-
Notifications
You must be signed in to change notification settings - Fork 5
cpcVideo
cpcVideo allows you to display SCR, WIN and FON files on your PC. It also emulates the Gate Array and CRTC and makes them available through Lua scripts, for prototyping CPC demo effects without writing any z80 code.
cpcVideo takes a single parameter which is the file to handle. On windows you can drop files on its icon or associate some file extensions to it. The recognized file extensions are:
- SCR: OCP format CPC screen
- WIN: OCP window
- FON: OCP font
- LUA: Lua script
A window will open to show the file. Errors will be printed to the standard output, so if the window doesn't open, try running it from command line to see them.
Lua scripts can be used for prototyping of demo effects in a CPC-like display without having to write z80 code. It can be used to quickly try an idea and see what it could look like.
Your script will be called for each VBL. The available functions are:
- value = Peek(address) - peek a byte at the given address.
- Poke(address, value) - poke a byte at the given address.
- SetCRTC(register, value) - Set a CRTC register at the start of the screen
- SetCRTC(register, value, line, nop) - Program a CRTC register change at the given position
- SetInk(pen, ink) - Set the initial ink for a pen (hardware color numbers are used)
- SetInk(pen, ink, line, nop) - Program an ink change
- SetMode(mode) - Sets the initial video mode
- SetMode(mode, line, nop) - Program a mode change (the GateArray will change the video mode only at the next HBL)