Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
vic3.c File Reference
#include "xemu/emutools.h"
#include "commodore_65.h"
#include "xemu/cpu65.h"
#include "vic3.h"
#include "xemu/f011_core.h"
Include dependency graph for vic3.c:

Go to the source code of this file.

Macros

#define RGB(r, g, b)   rgb_palette[((r) << 8) | ((g) << 4) | (b)]
 
#define COLMEMPTR   (memory + 0x1F800)
 
#define IS_H640   (vic3_registers[0x31] & 0x80)
 
#define IS_BPM   (vic3_registers[0x31] & 0x10)
 
#define BLINK_COUNTER_INIT   25
 
#define VIC_REG_COLOUR(n)   palette[vic3_registers[n]]
 
#define STATIC_COLOUR_RENDERER(colour, size)
 
#define VIC3_ADJUST_BY_HARDWARE_ATTRIBUTES(has_attrib_condition, colour_var, vdata_var)
 
#define SPRITE_X_START_SCREEN   24
 
#define SPRITE_Y_START_SCREEN   50
 

Functions

void vic3_open_frame_access (void)
 
void vic3_check_raster_interrupt (void)
 
int vic3_render_scanline (void)
 
void vic3_select_bank (int bank)
 
void vic3_write_reg (int addr, Uint8 data)
 
Uint8 vic3_read_reg (int addr)
 
void vic3_write_palette_reg (int num, Uint8 data)
 
void vic3_init (void)
 

Variables

int show_drive_led
 
Uint8 vic3_registers [0x80]
 
int vic_new_mode
 
int cpu_cycles_per_scanline
 
int frameskip
 
char scanline_render_debug_info [320]
 

Macro Definition Documentation

◆ BLINK_COUNTER_INIT

#define BLINK_COUNTER_INIT   25

Definition at line 41 of file vic3.c.

◆ COLMEMPTR

#define COLMEMPTR   (memory + 0x1F800)

Definition at line 38 of file vic3.c.

◆ IS_BPM

#define IS_BPM   (vic3_registers[0x31] & 0x10)

Definition at line 40 of file vic3.c.

◆ IS_H640

#define IS_H640   (vic3_registers[0x31] & 0x80)

Definition at line 39 of file vic3.c.

◆ RGB

#define RGB (   r,
  g,
 
)    rgb_palette[((r) << 8) | ((g) << 4) | (b)]

Definition at line 37 of file vic3.c.

◆ SPRITE_X_START_SCREEN

#define SPRITE_X_START_SCREEN   24

Definition at line 991 of file vic3.c.

◆ SPRITE_Y_START_SCREEN

#define SPRITE_Y_START_SCREEN   50

Definition at line 992 of file vic3.c.

◆ STATIC_COLOUR_RENDERER

#define STATIC_COLOUR_RENDERER (   colour,
  size 
)
Value:
do { \
register int a = size; \
while (a--) \
*(pixel++) = colour; \
} while(0)

Definition at line 148 of file vic3.c.

◆ VIC3_ADJUST_BY_HARDWARE_ATTRIBUTES

#define VIC3_ADJUST_BY_HARDWARE_ATTRIBUTES (   has_attrib_condition,
  colour_var,
  vdata_var 
)
Value:
do { \
if (has_attrib_condition) { \
if ((colour_var & 0xF0) == 0x10) { /* only the blink bit for the character is set */ \
if (blink_phase) \
vdata_var = 0; /* blinking character, in one phase, the character "disappears", ie blinking */ \
colour_var &= 15; \
} else if ((!(colour_var & 0x10)) || blink_phase) { \
if ((colour_var & 0x80) && (row_counter == 7)) /* underline (must be before reverse, as underline can be reversed as well!) */ \
vdata_var = 0xFF; /* the underline */ \
if (colour_var & 0x20) /* reverse bit for char */ \
vdata_var ^= 0xFF; \
if (colour_var & 0x40) /* highlight, this must be the LAST, since it sets the low nibble of coldata ... */ \
colour_var = 0x10 | (colour_var & 15); \
else \
colour_var &= 15; \
} else \
colour_var &= 15; \
} else \
colour_var &= 15; \
} while (0)

Definition at line 170 of file vic3.c.

◆ VIC_REG_COLOUR

#define VIC_REG_COLOUR (   n)    palette[vic3_registers[n]]

Definition at line 46 of file vic3.c.

Function Documentation

◆ vic3_check_raster_interrupt()

void vic3_check_raster_interrupt ( void  )

Definition at line 138 of file vic3.c.

◆ vic3_init()

void vic3_init ( void  )

Definition at line 926 of file vic3.c.

◆ vic3_open_frame_access()

void vic3_open_frame_access ( void  )

Definition at line 104 of file vic3.c.

◆ vic3_read_reg()

Uint8 vic3_read_reg ( int  addr)

Definition at line 854 of file vic3.c.

Here is the caller graph for this function:

◆ vic3_render_scanline()

int vic3_render_scanline ( void  )

Definition at line 571 of file vic3.c.

◆ vic3_select_bank()

void vic3_select_bank ( int  bank)

Definition at line 720 of file vic3.c.

◆ vic3_write_palette_reg()

void vic3_write_palette_reg ( int  num,
Uint8  data 
)

Definition at line 906 of file vic3.c.

◆ vic3_write_reg()

void vic3_write_reg ( int  addr,
Uint8  data 
)

Definition at line 745 of file vic3.c.

Here is the caller graph for this function:

Variable Documentation

◆ cpu_cycles_per_scanline

int cpu_cycles_per_scanline

Definition at line 64 of file vic3.c.

◆ frameskip

int frameskip

Definition at line 75 of file vic3.c.

◆ scanline_render_debug_info

char scanline_render_debug_info[320]

Definition at line 99 of file vic3.c.

◆ show_drive_led

int show_drive_led

Definition at line 60 of file vic3.c.

◆ vic3_registers

Uint8 vic3_registers[0x80]

Definition at line 61 of file vic3.c.

◆ vic_new_mode

int vic_new_mode

Definition at line 62 of file vic3.c.

colour
Uint32 colour
Definition: vera.c:67
size
int size
Definition: inject.c:37