Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
commodore_65.c File Reference
#include "xemu/emutools.h"
#include "xemu/emutools_files.h"
#include "commodore_65.h"
#include "xemu/cpu65.h"
#include "xemu/cia6526.h"
#include "xemu/f011_core.h"
#include "xemu/d81access.h"
#include "dma65.h"
#include "xemu/emutools_hid.h"
#include "vic3.h"
#include "xemu/sid.h"
#include "xemu/cbmhostfs.h"
#include "xemu/c64_kbd_mapping.h"
#include "xemu/emutools_config.h"
#include "c65_snapshot.h"
#include "xemu/emutools_gui.h"
#include "ui.h"
#include "inject.h"
#include "configdb.h"
Include dependency graph for commodore_65.c:

Go to the source code of this file.

Macros

#define IO_REMAP_VIRTUAL   0x110000
 
#define ROM_C000_REMAP   0x20000
 
#define ROM_8000_REMAP   0x30000
 
#define ROM_A000_REMAP   0x30000
 
#define ROM_E000_REMAP   0x30000
 
#define ROM_C64_CHR_REMAP   0x20000
 
#define ROM_C64_KERNAL_REMAP   0x20000
 
#define ROM_C64_BASIC_REMAP   0x20000
 

Functions

void apply_memory_config (void)
 
void clear_emu_events (void)
 
void d81access_cb_chgmode (const int which, const int mode)
 
int fdc_cb_rd_sec (const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector)
 
int fdc_cb_wr_sec (const int which, Uint8 *buffer, const Uint8 side, const Uint8 track, const Uint8 sector)
 
int c65_load_rom (const char *fn, unsigned int dma_rev)
 
void cpu65_do_aug_callback (void)
 
void cpu65_do_nop_callback (void)
 
Uint8 io_read (int addr)
 
void io_write (int addr, Uint8 data)
 
void write_phys_mem (int addr, Uint8 data)
 
void write_phys_mem_for_dma (int addr, Uint8 data)
 
Uint8 read_phys_mem (int addr)
 
Uint8 read_phys_mem_for_dma (int addr)
 
Uint8 cpu65_read_callback (Uint16 addr)
 
void cpu65_write_callback (Uint16 addr, Uint8 data)
 
void cpu65_write_rmw_callback (Uint16 addr, Uint8 old_data, Uint8 new_data)
 
int dump_memory (const char *fn)
 
int c65_reset_asked (void)
 
void c65_reset (void)
 
int emu_callback_key (int pos, SDL_Scancode key, int pressed, int handled)
 
int main (int argc, char **argv)
 

Variables

Uint8 memory [0x100000]
 
struct Cia6526 cia1 cia2
 
struct SidEmulation sids [2]
 
char current_rom_filepath [PATH_MAX]
 
Uint8 disk_cache [512]
 
char emulator_speed_title [] = "???MHz"
 

Macro Definition Documentation

◆ IO_REMAP_VIRTUAL

#define IO_REMAP_VIRTUAL   0x110000

Definition at line 60 of file commodore_65.c.

◆ ROM_8000_REMAP

#define ROM_8000_REMAP   0x30000

Definition at line 64 of file commodore_65.c.

◆ ROM_A000_REMAP

#define ROM_A000_REMAP   0x30000

Definition at line 65 of file commodore_65.c.

◆ ROM_C000_REMAP

#define ROM_C000_REMAP   0x20000

Definition at line 63 of file commodore_65.c.

◆ ROM_C64_BASIC_REMAP

#define ROM_C64_BASIC_REMAP   0x20000

Definition at line 70 of file commodore_65.c.

◆ ROM_C64_CHR_REMAP

#define ROM_C64_CHR_REMAP   0x20000

Definition at line 68 of file commodore_65.c.

◆ ROM_C64_KERNAL_REMAP

#define ROM_C64_KERNAL_REMAP   0x20000

Definition at line 69 of file commodore_65.c.

◆ ROM_E000_REMAP

#define ROM_E000_REMAP   0x30000

Definition at line 66 of file commodore_65.c.

Function Documentation

◆ apply_memory_config()

void apply_memory_config ( void  )

Definition at line 94 of file commodore_65.c.

Here is the caller graph for this function:

◆ c65_load_rom()

int c65_load_rom ( const char *  fn,
unsigned int  dma_rev 
)

Definition at line 304 of file commodore_65.c.

Here is the call graph for this function:

◆ c65_reset()

void c65_reset ( void  )

Definition at line 792 of file commodore_65.c.

Here is the caller graph for this function:

◆ c65_reset_asked()

int c65_reset_asked ( void  )

Definition at line 783 of file commodore_65.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_emu_events()

void clear_emu_events ( void  )

Definition at line 193 of file commodore_65.c.

Here is the caller graph for this function:

◆ cpu65_do_aug_callback()

void cpu65_do_aug_callback ( void  )

Definition at line 418 of file commodore_65.c.

◆ cpu65_do_nop_callback()

void cpu65_do_nop_callback ( void  )

Definition at line 434 of file commodore_65.c.

◆ cpu65_read_callback()

Uint8 cpu65_read_callback ( Uint16  addr)

Definition at line 711 of file commodore_65.c.

Here is the caller graph for this function:

◆ cpu65_write_callback()

void cpu65_write_callback ( Uint16  addr,
Uint8  data 
)

Definition at line 723 of file commodore_65.c.

◆ cpu65_write_rmw_callback()

void cpu65_write_rmw_callback ( Uint16  addr,
Uint8  old_data,
Uint8  new_data 
)

Definition at line 741 of file commodore_65.c.

◆ d81access_cb_chgmode()

void d81access_cb_chgmode ( const int  which,
const int  mode 
)

Definition at line 282 of file commodore_65.c.

◆ dump_memory()

int dump_memory ( const char *  fn)

Definition at line 754 of file commodore_65.c.

◆ emu_callback_key()

int emu_callback_key ( int  pos,
SDL_Scancode  key,
int  pressed,
int  handled 
)

Definition at line 807 of file commodore_65.c.

◆ fdc_cb_rd_sec()

int fdc_cb_rd_sec ( const int  which,
Uint8 buffer,
const Uint8  side,
const Uint8  track,
const Uint8  sector 
)

Definition at line 290 of file commodore_65.c.

◆ fdc_cb_wr_sec()

int fdc_cb_wr_sec ( const int  which,
Uint8 buffer,
const Uint8  side,
const Uint8  track,
const Uint8  sector 
)

Definition at line 296 of file commodore_65.c.

◆ io_read()

Uint8 io_read ( int  addr)

Definition at line 472 of file commodore_65.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_write()

void io_write ( int  addr,
Uint8  data 
)

Definition at line 546 of file commodore_65.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 926 of file commodore_65.c.

Here is the call graph for this function:

◆ read_phys_mem()

Uint8 read_phys_mem ( int  addr)

Definition at line 692 of file commodore_65.c.

◆ read_phys_mem_for_dma()

Uint8 read_phys_mem_for_dma ( int  addr)

Definition at line 698 of file commodore_65.c.

◆ write_phys_mem()

void write_phys_mem ( int  addr,
Uint8  data 
)

Definition at line 656 of file commodore_65.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_phys_mem_for_dma()

void write_phys_mem_for_dma ( int  addr,
Uint8  data 
)

Definition at line 683 of file commodore_65.c.

Here is the call graph for this function:

Variable Documentation

◆ cia2

struct Cia6526 cia1 cia2

Definition at line 44 of file commodore_65.c.

◆ current_rom_filepath

char current_rom_filepath[PATH_MAX]

Definition at line 51 of file commodore_65.c.

◆ disk_cache

Uint8 disk_cache[512]

Definition at line 53 of file commodore_65.c.

◆ emulator_speed_title

char emulator_speed_title[] = "???MHz"

Definition at line 78 of file commodore_65.c.

◆ memory

Uint8 memory

Definition at line 43 of file commodore_65.c.

◆ sids

struct SidEmulation sids[2]

Definition at line 45 of file commodore_65.c.