Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
commodore_geos.c File Reference
#include "xemu/emutools.h"
#include "xemu/emutools_files.h"
#include "commodore_geos.h"
#include "xemu/cpu65.h"
#include "xemu/cia6526.h"
#include "xemu/emutools_hid.h"
#include "xemu/emutools_config.h"
#include "xemu/c64_kbd_mapping.h"
#include "geos.h"
Include dependency graph for commodore_geos.c:

Go to the source code of this file.

Macros

#define DISK_IMAGE_SIZE   819200
 
#define CPU_PORT_DEFAULT_VALUE0   0xFF
 
#define CPU_PORT_DEFAULT_VALUE1   0xFF
 
#define BASIC_ROM_OFFSET   0x10000
 
#define KERNAL_ROM_OFFSET   0x12000
 
#define CHAR_ROM_OFFSET   0x14000
 
#define IO_OFFSET   0x15000
 
#define IO_VIRT_ADDR   (memory + IO_OFFSET)
 
#define MAP_RAM   memory
 
#define MAP_BASIC   memory + BASIC_ROM_OFFSET - 0xA000
 
#define MAP_KERNAL   memory + KERNAL_ROM_OFFSET - 0xE000
 
#define MAP_CHRROM   memory + CHAR_ROM_OFFSET - 0xD000
 
#define MAP_IO   memory + IO_OFFSET - 0xD000
 
#define MAP_RAM_TWICE   MAP_RAM,MAP_RAM
 
#define MAP_RAM_10_TIMES   MAP_RAM_TWICE,MAP_RAM_TWICE,MAP_RAM_TWICE,MAP_RAM_TWICE,MAP_RAM_TWICE
 
#define MAP_BASIC_TWICE   MAP_BASIC,MAP_BASIC
 
#define MAP_KERNAL_TWICE   MAP_KERNAL,MAP_KERNAL
 
#define KERNAL_PATCH_ADDR   0xE388
 
#define PATCH_P   memory[KERNAL_PATCH_ADDR - 0xE000 + KERNAL_ROM_OFFSET]
 
#define PATCH_OLD_BYTE   0x6C
 
#define PATCH_NEW_BYTE   CPU65_TRAP_OPCODE
 
#define GET_READ_P(a)   (memcfgs[cpu_port_memconfig][0][(a)>>12] + (a))
 
#define GET_WRITE_P(a)   (memcfgs[cpu_port_memconfig][1][(a)>>12] + (a))
 
#define IS_P_IO(p)   ((p) >= IO_VIRT_ADDR)
 
#define CHECK_PIXEL_POINTER
 
#define SPRITE_X_START_SCREEN   24
 
#define SPRITE_Y_START_SCREEN   50
 

Functions

void vic2_check_raster_interrupt (void)
 
void vic2_write_reg (int addr, Uint8 data)
 
Uint8 vic2_read_reg (int addr)
 
void vic2_render_screen (void)
 
void clear_emu_events (void)
 
int cpu65_trap_callback (const Uint8 opcode)
 
void cpu65_illegal_opcode_callback (void)
 
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 emu_callback_key (int pos, SDL_Scancode key, int pressed, int handled)
 
int main (int argc, char **argv)
 

Variables

Uint8 memory [IO_OFFSET+1]
 
Uint8 colour_sram [1024]
 

Macro Definition Documentation

◆ BASIC_ROM_OFFSET

#define BASIC_ROM_OFFSET   0x10000

Definition at line 65 of file commodore_geos.c.

◆ CHAR_ROM_OFFSET

#define CHAR_ROM_OFFSET   0x14000

Definition at line 67 of file commodore_geos.c.

◆ CHECK_PIXEL_POINTER

#define CHECK_PIXEL_POINTER

Definition at line 154 of file commodore_geos.c.

◆ CPU_PORT_DEFAULT_VALUE0

#define CPU_PORT_DEFAULT_VALUE0   0xFF

Definition at line 62 of file commodore_geos.c.

◆ CPU_PORT_DEFAULT_VALUE1

#define CPU_PORT_DEFAULT_VALUE1   0xFF

Definition at line 63 of file commodore_geos.c.

◆ DISK_IMAGE_SIZE

#define DISK_IMAGE_SIZE   819200

Definition at line 45 of file commodore_geos.c.

◆ GET_READ_P

#define GET_READ_P (   a)    (memcfgs[cpu_port_memconfig][0][(a)>>12] + (a))

Definition at line 103 of file commodore_geos.c.

◆ GET_WRITE_P

#define GET_WRITE_P (   a)    (memcfgs[cpu_port_memconfig][1][(a)>>12] + (a))

Definition at line 104 of file commodore_geos.c.

◆ IO_OFFSET

#define IO_OFFSET   0x15000

Definition at line 68 of file commodore_geos.c.

◆ IO_VIRT_ADDR

#define IO_VIRT_ADDR   (memory + IO_OFFSET)

Definition at line 71 of file commodore_geos.c.

◆ IS_P_IO

#define IS_P_IO (   p)    ((p) >= IO_VIRT_ADDR)

Definition at line 105 of file commodore_geos.c.

◆ KERNAL_PATCH_ADDR

#define KERNAL_PATCH_ADDR   0xE388

Definition at line 83 of file commodore_geos.c.

◆ KERNAL_ROM_OFFSET

#define KERNAL_ROM_OFFSET   0x12000

Definition at line 66 of file commodore_geos.c.

◆ MAP_BASIC

#define MAP_BASIC   memory + BASIC_ROM_OFFSET - 0xA000

Definition at line 74 of file commodore_geos.c.

◆ MAP_BASIC_TWICE

#define MAP_BASIC_TWICE   MAP_BASIC,MAP_BASIC

Definition at line 80 of file commodore_geos.c.

◆ MAP_CHRROM

#define MAP_CHRROM   memory + CHAR_ROM_OFFSET - 0xD000

Definition at line 76 of file commodore_geos.c.

◆ MAP_IO

#define MAP_IO   memory + IO_OFFSET - 0xD000

Definition at line 77 of file commodore_geos.c.

◆ MAP_KERNAL

#define MAP_KERNAL   memory + KERNAL_ROM_OFFSET - 0xE000

Definition at line 75 of file commodore_geos.c.

◆ MAP_KERNAL_TWICE

#define MAP_KERNAL_TWICE   MAP_KERNAL,MAP_KERNAL

Definition at line 81 of file commodore_geos.c.

◆ MAP_RAM

#define MAP_RAM   memory

Definition at line 73 of file commodore_geos.c.

◆ MAP_RAM_10_TIMES

Definition at line 79 of file commodore_geos.c.

◆ MAP_RAM_TWICE

#define MAP_RAM_TWICE   MAP_RAM,MAP_RAM

Definition at line 78 of file commodore_geos.c.

◆ PATCH_NEW_BYTE

#define PATCH_NEW_BYTE   CPU65_TRAP_OPCODE

Definition at line 86 of file commodore_geos.c.

◆ PATCH_OLD_BYTE

#define PATCH_OLD_BYTE   0x6C

Definition at line 85 of file commodore_geos.c.

◆ PATCH_P

#define PATCH_P   memory[KERNAL_PATCH_ADDR - 0xE000 + KERNAL_ROM_OFFSET]

Definition at line 84 of file commodore_geos.c.

◆ SPRITE_X_START_SCREEN

#define SPRITE_X_START_SCREEN   24

Definition at line 393 of file commodore_geos.c.

◆ SPRITE_Y_START_SCREEN

#define SPRITE_Y_START_SCREEN   50

Definition at line 394 of file commodore_geos.c.

Function Documentation

◆ clear_emu_events()

void clear_emu_events ( void  )

Definition at line 514 of file commodore_geos.c.

Here is the call graph for this function:

◆ cpu65_illegal_opcode_callback()

void cpu65_illegal_opcode_callback ( void  )

Definition at line 709 of file commodore_geos.c.

◆ cpu65_read_callback()

Uint8 cpu65_read_callback ( Uint16  addr)

Definition at line 718 of file commodore_geos.c.

◆ cpu65_trap_callback()

int cpu65_trap_callback ( const Uint8  opcode)

Definition at line 677 of file commodore_geos.c.

◆ cpu65_write_callback()

void cpu65_write_callback ( Uint16  addr,
Uint8  data 
)

Definition at line 727 of file commodore_geos.c.

◆ cpu65_write_rmw_callback()

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

Definition at line 743 of file commodore_geos.c.

◆ emu_callback_key()

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

Definition at line 764 of file commodore_geos.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 797 of file commodore_geos.c.

◆ vic2_check_raster_interrupt()

void vic2_check_raster_interrupt ( void  )

Definition at line 211 of file commodore_geos.c.

◆ vic2_read_reg()

Uint8 vic2_read_reg ( int  addr)

Definition at line 258 of file commodore_geos.c.

◆ vic2_render_screen()

void vic2_render_screen ( void  )

Definition at line 453 of file commodore_geos.c.

Here is the call graph for this function:

◆ vic2_write_reg()

void vic2_write_reg ( int  addr,
Uint8  data 
)

Definition at line 229 of file commodore_geos.c.

Variable Documentation

◆ colour_sram

Uint8 colour_sram[1024]

Definition at line 117 of file commodore_geos.c.

◆ drive

char * drive

Definition at line 151 of file commodore_geos.c.

◆ fullscreen

int fullscreen

Definition at line 149 of file commodore_geos.c.

◆ geosimg

char* geosimg

Definition at line 151 of file commodore_geos.c.

◆ geoskernal

char * geoskernal

Definition at line 151 of file commodore_geos.c.

◆ memory

Uint8 memory[IO_OFFSET+1]

Definition at line 70 of file commodore_geos.c.

◆ rombasic

char * rombasic

Definition at line 151 of file commodore_geos.c.

◆ romchar

char * romchar

Definition at line 151 of file commodore_geos.c.

◆ romkernal

char * romkernal

Definition at line 151 of file commodore_geos.c.

◆ sdlrenderquality

int sdlrenderquality

Definition at line 150 of file commodore_geos.c.

◆ syscon

int syscon

Definition at line 149 of file commodore_geos.c.