Expand description
MEGA65 support.
The MEGA65 is a 100% open-source implementation of the official (but never-released) Commodore 65 computer. It is in development by associates of the Museum of Electronic Games and Art e. V., a not-for-profit institution “dedicated to the preservation of our digital heritage.” As well as the original C65 design, the MEGA65 provides additional hardware and software enhancements, including a choice of using BASIC 10 or BASIC 65 (containing improvements that go beyond BASIC 10). The MEGA65 has an 8-bit CPU with additional 32-bit instructions implemented in FPGA. Like the original C65, it also has a Commodore 64 mode with a level of compatibility similar to that of the Commodore 128 running in C64 mode
Modules§
- iomap
- Automatically generated constants from
iomap.txt - libc
- Bindings for the MEGA65-libc library
- math
- Mathematical support functions
- random
- Support for pseudo random numbers
Structs§
- Allocator
- Allocator for 28-bit memory
- Memory
Iterator - Never-ending iterator to lpeek into 28-bit memory
- Ptr28
- Fat pointer to region in 28-bit address space
- Resolution
- Struct used to store widht-height resolutions
Enums§
- Default
Palette - Default system palette
- VicBank
Constants§
- COLOR_
RAM - DEFAULT_
MIXEDCASE_ FONT - DEFAULT_
SCREEN - DEFAULT_
UPPERCASE_ FONT - MATH_
ACCELERATOR - Math Acceleration registers
- MATH_
STATUS - Math multiplication-division status flags
- MAX_
28_ BIT_ ADDRESS - Maximum value in 28-bit address space
- SID0
- Pointer to first sound interface device
- SID1
- Pointer to second sound interface device
- SID2
- Pointer to third sound interface device
- SID3
- Pointer to fourth sound interface device
- VICII
Functions§
- cgetc
- Waits until a character is in the keyboard buffer and returns as petscii
- clear_
screen - Clear all chars on screen
- conio_
init - Initialises the conio internal state
- cputs
- Output screen codes at current position
- cputs_
xy - Output multiple screen codes at X,Y coordinates
- flush_
keyboard_ buffer - Flush keyboard buffer
- get_
real_ time_ clock - Read real time clock
- get_
screen_ size - Returns screen resolution (char width, char heigh)
- go_home
- Goto top left corner
- goto_xy
- Goto specific character position
- lcopy⚠
- DMA copy in 28 bit address space
- lpeek
- Read into 28 bit memory
- lpoke⚠
- Write into 28 bit memory
- math_
accelerator - Get reference to math accelerator
- set_
background_ color - Sets the current screen (background) color
- set_
border_ color - Sets the current border color
- set_
charset_ address - Set character set address using mega65-libc
- set_
extended_ attributes - Sets VIC-III extended attributes mode to enable blink, underline, bold, highlight
- set_
lower_ case - Shift to lower case ROM charset
- set_
text_ color - Sets the current text color
- set_
upper_ case - Shift to upper case ROM charset
- sid0
- Get reference to first SID chip
- sid1
- Get reference to second SID chip
- sid2
- Get reference to third SID chip
- sid3
- Get reference to fourth SID chip
- speed_
mode1 - Set CPU speed to 1 Mhz
- speed_
mode3 - Set CPU speed to 3.5 Mhz
- speed_
mode40 - Set CPU speed to 40 Mhz
- unset_
extended_ attributes - Clears VIC-III extended attributes mode to disable blink, underline, bold, highlight
- vic2
- Get reference to VIC2 chip