Module mega65

Module mega65 

Source
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
MemoryIterator
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§

DefaultPalette
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