1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-01 13:30:50 +00:00

Adding VIC III to mega65.h

This commit is contained in:
jesper 2020-09-06 08:40:50 +02:00
parent 1cac21d8e1
commit 21ef83b247
2 changed files with 132 additions and 0 deletions

View File

@ -36,8 +36,16 @@ char* const CHARGEN = 0xd000;
struct MOS6581_SID * const SID = 0xd400;
// The VIC-II MOS 6567/6569
struct MOS6569_VICII* const VICII = 0xd000;
// The VIC III MOS 4567/4569
struct MOS6569_VICIII* const VICIII = 0xd000;
// Color Ram
char * const COLORRAM = 0xd800;
// Palette RED
char * const PALRED = 0xd100;
// Palette GREEN
char * const PALGREEN = 0xd200;
// Palette BLUE
char * const PALBLUE = 0xd300;
// Default address of screen character matrix
char * const DEFAULT_SCREEN = 0x0800;

View File

@ -0,0 +1,124 @@
// MOS 4567 / 4569 Video Interface Chip (VIC III)
struct MOS4569_VICIII {
char SPRITE0_X;
char SPRITE0_Y;
char SPRITE1_X;
char SPRITE1_Y;
char SPRITE2_X;
char SPRITE2_Y;
char SPRITE3_X;
char SPRITE3_Y;
char SPRITE4_X;
char SPRITE4_Y;
char SPRITE5_X;
char SPRITE5_Y;
char SPRITE6_X;
char SPRITE6_Y;
char SPRITE7_X;
char SPRITE7_Y;
char SPRITES_XMSB;
char CONTROL1;
char RASTER;
char LIGHTPEN_X;
char LIGHTPEN_Y;
char SPRITES_ENABLE;
char CONTROL2;
char SPRITES_EXPAND_Y;
char MEMORY;
char IRQ_STATUS;
char IRQ_ENABLE;
char SPRITES_PRIORITY;
char SPRITES_MC;
char SPRITES_EXPAND_X;
char SPRITES_COLLISION;
char SPRITES_BG_COLLISION;
char BORDER_COLOR;
char BG_COLOR;
char BG_COLOR1;
char BG_COLOR2;
char BG_COLOR3;
char SPRITES_MCOLOR1;
char SPRITES_MCOLOR2;
char SPRITE0_COLOR;
char SPRITE1_COLOR;
char SPRITE2_COLOR;
char SPRITE3_COLOR;
char SPRITE4_COLOR;
char SPRITE5_COLOR;
char SPRITE6_COLOR;
char SPRITE7_COLOR;
// $D02f KEY register is used for choosing between the different I/O personalities.
// This disables/enables different registers in $D000-$DFFF
// $00: C64 personality
// $A5, $96: C65 personality
// $45, $54: MEGA65 ETHERNET personality
// $47, $53: MEGA65 personality
char KEY;
// $D030 ROM_BANKS;
// Bit 20-bit Address 16-bit Address Read-Write
// 0 CRAM2K $1F800 $1FFFF, $D800 $DFFF Y
// $FF80000 $FF807FF
// 3 ROM8 $38000 $39FFF $8000 $9FFF N
// 4 ROMA $3A000 $3BFFF $A000 $BFFF N
// 5 ROMC $2C000 $2CFFF $C000 $CFFF N
// 6 CROM9 $29000 $29FFF $D000 $DFFF N
// 7 ROME $3E000 $3FFFF $E000 $FFFF N
char ROM_BANKS;
// $D031 CONTROL3
// BIT
// 0 INT Enable VIC-III interlaced mode
// 1 MONO Enable VIC-III MONO video output (not implemented)
// 2 H1280 Enable 1280 horizontal pixels (not implemented)
// 3 V400 Enable 400 vertical pixels
// 4 BPM Bit-Plane Mode
// 5 ATTR Enable extended attributes and 8 bit colour entries
// 6 FAST Enable C65 FAST mode (3 .5MHz)
// 7 H640 Enable C64 640 horizontal pixels / 80 column mode
char CONTROL3;
char UNUSED;
// $D033 Bitplane 0 Address
// 1-3 B0ADEVN Bitplane 0 address, even lines
// 5-7 B0ADODD Bitplane 0 address, odd lines
char B0_ADDR;
// $D034 Bitplane 1 Address
char B1_ADDR;
// $D035 Bitplane 2 Address
char B2_ADDR;
// $D036 Bitplane 3 Address
char B3_ADDR;
// $D037 Bitplane 4 Address
char B4_ADDR;
// $D038 Bitplane 5 Address
char B5_ADDR;
// $D039 Bitplane 6 Address
char B6_ADDR;
// $D03A Bitplane 7 Address
char B7_ADDR;
// $D03B Complement bitplane flags
char BPCOMP;
// $D03C Bitplane X
char BPX;
// $D03D Bitplane Y
char BPY;
// $D03E Bitplane X Offset
char HPOS;
// $D03F Bitplane Y Offset
char VPOS;
// $D040 Display Address Translater (DAT) Bitplane 0 port
char B0PIX;
// $D041 Display Address Translater (DAT) Bitplane 1 port
char B1PIX;
// $D042 Display Address Translater (DAT) Bitplane 2 port
char B2PIX;
// $D043 Display Address Translater (DAT) Bitplane 3 port
char B3PIX;
// $D044 Display Address Translater (DAT) Bitplane 4 port
char B4PIX;
// $D045 Display Address Translater (DAT) Bitplane 5 port
char B5PIX;
// $D046 Display Address Translater (DAT) Bitplane 6 port
char B6PIX;
// $D047 Display Address Translater (DAT) Bitplane 7 port
char B7PIX;
};