Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

MOS6569 Class Reference

#include <VIC.h>

Collaboration diagram for MOS6569:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MOS6569 (C64 *c64, C64Display *disp, MOS6510 *CPU, uint8 *RAM, uint8 *Char, uint8 *Color)
 ~MOS6569 ()
uint8 ReadRegister (uint16 adr)
void WriteRegister (uint16 adr, uint8 byte)
int EmulateLine (void)
void ChangedVA (uint16 new_va)
void TriggerLightpen (void)
void ReInitColors (void)
void GetState (MOS6569State *vd)
void SetState (MOS6569State *vd)

Public Attributes

PrefsThePrefs

Private Member Functions

void vblank (void)
void init_text_color_table (uint8 *colors)
void raster_irq (void)
uint8get_physical (uint16 adr)
void el_std_text (uint8 *p, uint8 *q, uint8 *r)
void el_mc_text (uint8 *p, uint8 *q, uint8 *r)
void el_std_bitmap (uint8 *p, uint8 *q, uint8 *r)
void el_mc_bitmap (uint8 *p, uint8 *q, uint8 *r)
void el_ecm_text (uint8 *p, uint8 *q, uint8 *r)
void el_std_idle (uint8 *p, uint8 *r)
void el_mc_idle (uint8 *p, uint8 *r)
int el_update_mc (int raster)
void make_mc_table (void)
void el_sprites (uint8 *chunky_ptr)

Private Attributes

union {
   struct {
      uint8   a
      uint8   b
      uint8   c
      uint8   d
   }   a
   uint32   b
TextColorTable [16][16][256][2]
uint16 mx [8]
uint8 my [8]
uint8 mx8
uint8 ctrl1
uint8 ctrl2
uint8 lpx
uint8 lpy
uint8 me
uint8 mxe
uint8 mye
uint8 mdp
uint8 mmc
uint8 vbase
uint8 irq_flag
uint8 irq_mask
uint8 clx_spr
uint8 clx_bgr
uint8 ec
uint8 b0c
uint8 b1c
uint8 b2c
uint8 b3c
uint8 mm0
uint8 mm1
uint8 sc [8]
uint8ram
uint8char_rom
uint8color_ram
C64the_c64
C64Displaythe_display
MOS6510the_cpu
uint8 colors [256]
uint8 ec_color
uint8 b0c_color
uint8 b1c_color
uint8 b2c_color
uint8 b3c_color
uint8 mm0_color
uint8 mm1_color
uint8 spr_color [8]
uint32 ec_color_long
uint8 matrix_line [40]
uint8 color_line [40]
uint8chunky_base
 Pointer to start of bitmap buffer (constant during emulation).

uint8chunky_line_start
int xmod
uint16 raster_y
uint16 irq_raster
uint16 dy_start
uint16 dy_stop
uint16 rc
uint16 vc
uint16 vc_base
uint16 x_scroll
uint16 y_scroll
uint16 cia_vabase
uint16 mc [8]
int display_idx
int skip_counter
long pad0
uint8 spr_coll_buf [0x180]
uint8 fore_mask_buf [0x180/8]
uint8 text_chunky_buf [40 *8]
bool display_state
bool border_on
bool frame_skipped
uint8 bad_lines_enabled
bool lp_triggered
uint16 mc_color_lookup [4]
bool border_40_col
uint8 sprite_on
uint8matrix_base
uint8char_base
uint8bitmap_base

Constructor & Destructor Documentation

MOS6569::MOS6569 C64 c64,
C64Display disp,
MOS6510 CPU,
uint8 RAM,
uint8 Char,
uint8 Color
 

Definition at line 321 of file VIC.cpp.

References __CHECK_NULL, CTOR, memset, ROW24_YSTART, and ROW24_YSTOP.

MOS6569::~MOS6569  ) 
 

Definition at line 412 of file VIC.cpp.

References DTOR.


Member Function Documentation

void MOS6569::ChangedVA uint16  new_va  ) 
 

Definition at line 914 of file VIC.cpp.

References WriteRegister().

Referenced by MOS6526_2::Reset(), and MOS6526_2::WriteRegister().

void MOS6569::el_ecm_text uint8 p,
uint8 q,
uint8 r
[inline, private]
 

Definition at line 115 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_mc_bitmap uint8 p,
uint8 q,
uint8 r
[inline, private]
 

Definition at line 85 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_mc_idle uint8 p,
uint8 r
[inline, private]
 

Definition at line 155 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_mc_text uint8 p,
uint8 q,
uint8 r
[inline, private]
 

Definition at line 31 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_sprites uint8 chunky_ptr  )  [inline, private]
 

Definition at line 1654 of file VIC.cpp.

References el_update_mc(), ExpTable, get_physical(), MultiExpTable, Prefs::SpriteCollisions, ThePrefs, MOS6510::TriggerVICIRQ(), uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_std_bitmap uint8 p,
uint8 q,
uint8 r
[inline, private]
 

Definition at line 65 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_std_idle uint8 p,
uint8 r
[inline, private]
 

Definition at line 136 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

void MOS6569::el_std_text uint8 p,
uint8 q,
uint8 r
[inline, private]
 

Definition at line 10 of file el_Acorn.i.

References uint32, and uint8.

Referenced by EmulateLine().

int MOS6569::el_update_mc int  raster  )  [inline, private]
 

Definition at line 1939 of file VIC.cpp.

References uint16, and uint8.

Referenced by el_sprites(), and EmulateLine().

int MOS6569::EmulateLine void   ) 
 

Definition at line 2115 of file VIC.cpp.

References ALIGN_CHECK, Prefs::BadLineCycles, C64Display::BitmapBase(), c, CD4, COL38_XSTART, COL38_XSTOP, COL40_XSTART, COL40_XSTOP, DISPLAY_Y, el_ecm_text(), el_mc_bitmap(), el_mc_idle(), el_mc_text(), el_sprites(), el_std_bitmap(), el_std_idle(), el_std_text(), el_update_mc(), ELOG2, FIRST_DISP_LINE, FIRST_DMA_LINE, LAST_DISP_LINE, LAST_DMA_LINE, memcpy, memset, Prefs::NormalCycles, raster_irq(), Prefs::SpritesOn, ThePrefs, TOTAL_RASTERS, uint32, uint8, and vblank().

Referenced by C64::thread_func().

uint8 * MOS6569::get_physical uint16  adr  )  [inline, private]
 

Definition at line 478 of file VIC.cpp.

References uint8.

Referenced by el_sprites(), SetState(), and WriteRegister().

void MOS6569::GetState MOS6569State vd  ) 
 

Definition at line 493 of file VIC.cpp.

References MOS6569State::b0c, MOS6569State::b1c, MOS6569State::b2c, MOS6569State::b3c, MOS6569State::bad_line, MOS6569State::bad_line_enable, MOS6569State::bank_base, MOS6569State::bitmap_base, MOS6569State::border_on, MOS6569State::char_base, MOS6569State::ctrl1, MOS6569State::ctrl2, MOS6569State::cycle, MOS6569State::display_state, MOS6569State::ec, FIRST_DMA_LINE, MOS6569State::irq_flag, MOS6569State::irq_mask, MOS6569State::irq_raster, LAST_DMA_LINE, MOS6569State::last_vic_byte, MOS6569State::lp_triggered, MOS6569State::lpx, MOS6569State::lpy, MOS6569State::m0c, MOS6569State::m0x, MOS6569State::m0y, MOS6569State::m1c, MOS6569State::m1x, MOS6569State::m1y, MOS6569State::m2c, MOS6569State::m2x, MOS6569State::m2y, MOS6569State::m3c, MOS6569State::m3x, MOS6569State::m3y, MOS6569State::m4c, MOS6569State::m4x, MOS6569State::m4y, MOS6569State::m5c, MOS6569State::m5x, MOS6569State::m5y, MOS6569State::m6c, MOS6569State::m6x, MOS6569State::m6y, MOS6569State::m7c, MOS6569State::m7x, MOS6569State::m7y, MOS6569State::matrix_base, MOS6569State::mc, MOS6569State::mc_base, MOS6569State::md, MOS6569State::mdp, MOS6569State::me, MOS6569State::ml_index, MOS6569State::mm, MOS6569State::mm0, MOS6569State::mm1, MOS6569State::mmc, MOS6569State::mx8, MOS6569State::mxe, MOS6569State::mye, MOS6569State::pad0, MOS6569State::raster, MOS6569State::raster_x, MOS6569State::rc, MOS6569State::ref_cnt, MOS6569State::spr_disp, MOS6569State::spr_dma, MOS6569State::sprite_base, MOS6569State::ud_border_on, uint8, MOS6569State::vbase, MOS6569State::vc, and MOS6569State::vc_base.

Referenced by C64::SaveVICState(), and view_vic_state().

void MOS6569::init_text_color_table uint8 colors  )  [private]
 

Definition at line 280 of file VIC.cpp.

Referenced by ReInitColors().

void MOS6569::make_mc_table void   )  [private]
 

Definition at line 463 of file VIC.cpp.

Referenced by ReInitColors(), SetState(), and WriteRegister().

void MOS6569::raster_irq void   )  [inline, private]
 

Definition at line 656 of file VIC.cpp.

References MOS6510::TriggerVICIRQ().

Referenced by EmulateLine(), and WriteRegister().

uint8 MOS6569::ReadRegister uint16  adr  ) 
 

Definition at line 671 of file VIC.cpp.

References uint8.

Referenced by MOS6510::read_byte_io().

void MOS6569::ReInitColors void   ) 
 

Definition at line 422 of file VIC.cpp.

References C64Display::BitmapBase(), DISPLAY_Y, init_text_color_table(), C64Display::InitColors(), make_mc_table(), memset, and uint8.

Referenced by C64Display::BuildColorTable().

void MOS6569::SetState MOS6569State vd  ) 
 

Definition at line 563 of file VIC.cpp.

References MOS6569State::b0c, MOS6569State::b1c, MOS6569State::b2c, MOS6569State::b3c, MOS6569State::bad_line_enable, MOS6569State::bank_base, BOOL_BIT, MOS6569State::border_on, MOS6569State::ctrl1, MOS6569State::ctrl2, MOS6569State::display_state, MOS6569State::ec, get_physical(), MOS6569State::irq_flag, MOS6569State::irq_mask, MOS6569State::irq_raster, MOS6569State::lp_triggered, MOS6569State::lpx, MOS6569State::lpy, MOS6569State::m0c, MOS6569State::m0x, MOS6569State::m0y, MOS6569State::m1c, MOS6569State::m1x, MOS6569State::m1y, MOS6569State::m2c, MOS6569State::m2x, MOS6569State::m2y, MOS6569State::m3c, MOS6569State::m3x, MOS6569State::m3y, MOS6569State::m4c, MOS6569State::m4x, MOS6569State::m4y, MOS6569State::m5c, MOS6569State::m5x, MOS6569State::m5y, MOS6569State::m6c, MOS6569State::m6x, MOS6569State::m6y, MOS6569State::m7c, MOS6569State::m7x, MOS6569State::m7y, make_mc_table(), MOS6569State::mc, MOS6569State::md, MOS6569State::mdp, MOS6569State::me, MOS6569State::mm, MOS6569State::mm0, MOS6569State::mm1, MOS6569State::mmc, MOS6569State::mx8, MOS6569State::mxe, MOS6569State::mye, MOS6569State::rc, ROW24_YSTART, ROW24_YSTOP, ROW25_YSTART, ROW25_YSTOP, MOS6569State::spr_dma, MOS6569State::vbase, MOS6569State::vc, and MOS6569State::vc_base.

Referenced by C64::LoadVICState().

void MOS6569::TriggerLightpen void   ) 
 

Definition at line 925 of file VIC.cpp.

References MOS6510::TriggerVICIRQ(), and uint8.

Referenced by MOS6526_1::check_lp().

void MOS6569::vblank void   )  [inline, private]
 

Definition at line 947 of file VIC.cpp.

References C64Display::BitmapBase(), C64Display::BitmapXMod(), Prefs::SkipFrames, ThePrefs, and C64::VBlank().

Referenced by EmulateLine().

void MOS6569::WriteRegister uint16  adr,
uint8  byte
 

Definition at line 760 of file VIC.cpp.

References BOOL_BIT, MOS6510::ClearVICIRQ(), get_physical(), make_mc_table(), raster_irq(), ROW24_YSTART, ROW24_YSTOP, ROW25_YSTART, ROW25_YSTOP, MOS6510::TriggerVICIRQ(), and uint16.

Referenced by ChangedVA(), and MOS6510::write_byte_io().


Member Data Documentation

struct { ... } MOS6569::a [private]
 

uint8 MOS6569::a [private]
 

Definition at line 85 of file VIC.h.

uint32 MOS6569::b [private]
 

Definition at line 87 of file VIC.h.

uint8 MOS6569::b [private]
 

Definition at line 85 of file VIC.h.

uint8 MOS6569::b0c [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::b0c_color [private]
 

Definition at line 117 of file VIC.h.

uint8 MOS6569::b1c [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::b1c_color [private]
 

Definition at line 117 of file VIC.h.

uint8 MOS6569::b2c [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::b2c_color [private]
 

Definition at line 117 of file VIC.h.

uint8 MOS6569::b3c [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::b3c_color [private]
 

Definition at line 117 of file VIC.h.

uint8 MOS6569::bad_lines_enabled [private]
 

Definition at line 163 of file VIC.h.

uint8* MOS6569::bitmap_base [private]
 

Definition at line 227 of file VIC.h.

bool MOS6569::border_40_col [private]
 

Definition at line 222 of file VIC.h.

bool MOS6569::border_on [private]
 

Definition at line 161 of file VIC.h.

uint8 MOS6569::c [private]
 

Definition at line 85 of file VIC.h.

Referenced by EmulateLine().

uint8* MOS6569::char_base [private]
 

Definition at line 226 of file VIC.h.

uint8 * MOS6569::char_rom [private]
 

Definition at line 110 of file VIC.h.

uint8* MOS6569::chunky_base [private]
 

Pointer to start of bitmap buffer (constant during emulation).

Definition at line 132 of file VIC.h.

uint8* MOS6569::chunky_line_start [private]
 

Definition at line 134 of file VIC.h.

uint16 MOS6569::cia_vabase [private]
 

Definition at line 146 of file VIC.h.

uint8 MOS6569::clx_bgr [private]
 

Definition at line 106 of file VIC.h.

uint8 MOS6569::clx_spr [private]
 

Definition at line 106 of file VIC.h.

uint8 MOS6569::color_line[40] [private]
 

Definition at line 125 of file VIC.h.

uint8 * MOS6569::color_ram [private]
 

Definition at line 110 of file VIC.h.

uint8 MOS6569::colors[256] [private]
 

Definition at line 115 of file VIC.h.

uint8 MOS6569::ctrl1 [private]
 

Definition at line 101 of file VIC.h.

uint8 MOS6569::ctrl2 [private]
 

Definition at line 101 of file VIC.h.

uint8 MOS6569::d [private]
 

Definition at line 85 of file VIC.h.

int MOS6569::display_idx [private]
 

Definition at line 150 of file VIC.h.

bool MOS6569::display_state [private]
 

Definition at line 160 of file VIC.h.

uint16 MOS6569::dy_start [private]
 

Definition at line 139 of file VIC.h.

uint16 MOS6569::dy_stop [private]
 

Definition at line 140 of file VIC.h.

uint8 MOS6569::ec [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::ec_color [private]
 

Definition at line 117 of file VIC.h.

uint32 MOS6569::ec_color_long [private]
 

Definition at line 122 of file VIC.h.

uint8 MOS6569::fore_mask_buf[0x180/8] [private]
 

Definition at line 155 of file VIC.h.

bool MOS6569::frame_skipped [private]
 

Definition at line 162 of file VIC.h.

uint8 MOS6569::irq_flag [private]
 

Definition at line 105 of file VIC.h.

uint8 MOS6569::irq_mask [private]
 

Definition at line 105 of file VIC.h.

uint16 MOS6569::irq_raster [private]
 

Definition at line 138 of file VIC.h.

bool MOS6569::lp_triggered [private]
 

Definition at line 164 of file VIC.h.

uint8 MOS6569::lpx [private]
 

Definition at line 102 of file VIC.h.

uint8 MOS6569::lpy [private]
 

Definition at line 102 of file VIC.h.

uint8* MOS6569::matrix_base [private]
 

Definition at line 225 of file VIC.h.

uint8 MOS6569::matrix_line[40] [private]
 

Definition at line 124 of file VIC.h.

uint16 MOS6569::mc[8] [private]
 

Definition at line 148 of file VIC.h.

uint16 MOS6569::mc_color_lookup[4] [private]
 

Definition at line 220 of file VIC.h.

uint8 MOS6569::mdp [private]
 

Definition at line 103 of file VIC.h.

uint8 MOS6569::me [private]
 

Definition at line 103 of file VIC.h.

uint8 MOS6569::mm0 [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::mm0_color [private]
 

Definition at line 119 of file VIC.h.

uint8 MOS6569::mm1 [private]
 

Definition at line 107 of file VIC.h.

uint8 MOS6569::mm1_color [private]
 

Definition at line 119 of file VIC.h.

uint8 MOS6569::mmc [private]
 

Definition at line 103 of file VIC.h.

uint16 MOS6569::mx[8] [private]
 

Definition at line 98 of file VIC.h.

uint8 MOS6569::mx8 [private]
 

Definition at line 100 of file VIC.h.

uint8 MOS6569::mxe [private]
 

Definition at line 103 of file VIC.h.

uint8 MOS6569::my[8] [private]
 

Definition at line 99 of file VIC.h.

uint8 MOS6569::mye [private]
 

Definition at line 103 of file VIC.h.

long MOS6569::pad0 [private]
 

Definition at line 153 of file VIC.h.

uint8* MOS6569::ram [private]
 

Definition at line 110 of file VIC.h.

uint16 MOS6569::raster_y [private]
 

Definition at line 137 of file VIC.h.

uint16 MOS6569::rc [private]
 

Definition at line 141 of file VIC.h.

uint8 MOS6569::sc[8] [private]
 

Definition at line 108 of file VIC.h.

int MOS6569::skip_counter [private]
 

Definition at line 151 of file VIC.h.

uint8 MOS6569::spr_coll_buf[0x180] [private]
 

Definition at line 154 of file VIC.h.

uint8 MOS6569::spr_color[8] [private]
 

Definition at line 120 of file VIC.h.

uint8 MOS6569::sprite_on [private]
 

Definition at line 223 of file VIC.h.

uint8 MOS6569::text_chunky_buf[40*8] [private]
 

Definition at line 157 of file VIC.h.

union { ... } MOS6569::TextColorTable[16][16][256][2] [private]
 

C64* MOS6569::the_c64 [private]
 

Definition at line 111 of file VIC.h.

MOS6510* MOS6569::the_cpu [private]
 

Definition at line 113 of file VIC.h.

C64Display* MOS6569::the_display [private]
 

Definition at line 112 of file VIC.h.

Prefs& MOS6569::ThePrefs
 

Definition at line 238 of file VIC.h.

Referenced by el_sprites(), EmulateLine(), and vblank().

uint8 MOS6569::vbase [private]
 

Definition at line 104 of file VIC.h.

uint16 MOS6569::vc [private]
 

Definition at line 142 of file VIC.h.

uint16 MOS6569::vc_base [private]
 

Definition at line 143 of file VIC.h.

uint16 MOS6569::x_scroll [private]
 

Definition at line 144 of file VIC.h.

int MOS6569::xmod [private]
 

Definition at line 135 of file VIC.h.

uint16 MOS6569::y_scroll [private]
 

Definition at line 145 of file VIC.h.


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:12:32 2005 for E32frodo by doxygen 1.3.3