Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
primo.c File Reference
#include "xemu/emutools.h"
#include "xemu/emutools_files.h"
#include "xemu/emutools_hid.h"
#include "xemu/emutools_config.h"
#include "xemu/emutools_gui.h"
#include "xemu/z80.h"
#include "xemu/z80_dasm.h"
#include "primo.h"
#include <ctype.h>
#include <strings.h>
Include dependency graph for primo.c:

Go to the source code of this file.

Macros

#define ROM_Z80_PC_LOAD_TRIGGER   0x3994
 
#define EMU_LOOP_NMI_NOTIFY   1
 
#define EMU_LOOP_LOAD_NOTIFY   2
 
#define EMU_LOOP_UPDATE_NOTIFY   4
 
#define EMU_LOOP_DISASM_NOTIFY   8
 
#define VBLANK_ON   32
 
#define VBLANK_OFF   0
 
#define VBLANK_START_SCANLINE   256
 
#define PAL_LINE_FREQ   15625
 
#define JOY_CLOCKING_TIMEOUT_MICROSECS   272
 
#define AUDIO_SAMPLING_FREQ   (PAL_LINE_FREQ * 2)
 
#define AUDIO_PULSE_SAMPLES_MAX_PASS   (AUDIO_SAMPLING_FREQ / 32)
 
#define VOLUME8   0x10
 
#define VIRTUAL_SHIFT_POS   0x03
 

Functions

Z80EX_BYTE z80ex_mread_cb (Z80EX_WORD addr, int m1_state)
 
void z80ex_mwrite_cb (Z80EX_WORD addr, Z80EX_BYTE value)
 
Z80EX_BYTE z80ex_pread_cb (Z80EX_WORD port16)
 
void z80ex_pwrite_cb (Z80EX_WORD port16, Z80EX_BYTE value)
 
Z80EX_BYTE z80ex_intread_cb (void)
 
void z80ex_reti_cb (void)
 
void clear_emu_events (void)
 
void emu_quit_callback (void)
 
void emu_dropfile_callback (const char *fn)
 
int emu_callback_key (int pos, SDL_Scancode key, int pressed, int handled)
 
int main (int argc, char **argv)
 

Variables

Z80EX_CONTEXT z80ex
 
struct {
   Uint8 *   wr_p [4]
 
   Uint8 *   rd_p [4]
 
   Uint8 *   vid16k
 
   Uint8   main [0x10000]
 
   Uint8   exprom [0x8000]
 
   Uint8   expram [0x4000]
 
   Uint8   wrwaste [0x4000]
 
   Uint8   rdempty [0x4000]
 
memory
 
int serial = 2 | 8 | 16 | 32
 

Macro Definition Documentation

◆ AUDIO_PULSE_SAMPLES_MAX_PASS

#define AUDIO_PULSE_SAMPLES_MAX_PASS   (AUDIO_SAMPLING_FREQ / 32)

Definition at line 93 of file primo.c.

◆ AUDIO_SAMPLING_FREQ

#define AUDIO_SAMPLING_FREQ   (PAL_LINE_FREQ * 2)

Definition at line 92 of file primo.c.

◆ EMU_LOOP_DISASM_NOTIFY

#define EMU_LOOP_DISASM_NOTIFY   8

Definition at line 73 of file primo.c.

◆ EMU_LOOP_LOAD_NOTIFY

#define EMU_LOOP_LOAD_NOTIFY   2

Definition at line 71 of file primo.c.

◆ EMU_LOOP_NMI_NOTIFY

#define EMU_LOOP_NMI_NOTIFY   1

Definition at line 70 of file primo.c.

◆ EMU_LOOP_UPDATE_NOTIFY

#define EMU_LOOP_UPDATE_NOTIFY   4

Definition at line 72 of file primo.c.

◆ JOY_CLOCKING_TIMEOUT_MICROSECS

#define JOY_CLOCKING_TIMEOUT_MICROSECS   272

Definition at line 82 of file primo.c.

◆ PAL_LINE_FREQ

#define PAL_LINE_FREQ   15625

Definition at line 78 of file primo.c.

◆ ROM_Z80_PC_LOAD_TRIGGER

#define ROM_Z80_PC_LOAD_TRIGGER   0x3994

Definition at line 39 of file primo.c.

◆ VBLANK_OFF

#define VBLANK_OFF   0

Definition at line 76 of file primo.c.

◆ VBLANK_ON

#define VBLANK_ON   32

Definition at line 75 of file primo.c.

◆ VBLANK_START_SCANLINE

#define VBLANK_START_SCANLINE   256

Definition at line 77 of file primo.c.

◆ VIRTUAL_SHIFT_POS

#define VIRTUAL_SHIFT_POS   0x03

Definition at line 232 of file primo.c.

◆ VOLUME8

#define VOLUME8   0x10

Definition at line 94 of file primo.c.

Function Documentation

◆ clear_emu_events()

void clear_emu_events ( void  )

Definition at line 319 of file primo.c.

Here is the call graph for this function:

◆ emu_callback_key()

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

Definition at line 903 of file primo.c.

Here is the call graph for this function:

◆ emu_dropfile_callback()

void emu_dropfile_callback ( const char *  fn)

Definition at line 675 of file primo.c.

Here is the caller graph for this function:

◆ emu_quit_callback()

void emu_quit_callback ( void  )

Definition at line 483 of file primo.c.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 918 of file primo.c.

Here is the call graph for this function:

◆ z80ex_intread_cb()

Z80EX_BYTE z80ex_intread_cb ( void  )

Definition at line 220 of file primo.c.

◆ z80ex_mread_cb()

Z80EX_BYTE z80ex_mread_cb ( Z80EX_WORD  addr,
int  m1_state 
)

Definition at line 126 of file primo.c.

◆ z80ex_mwrite_cb()

void z80ex_mwrite_cb ( Z80EX_WORD  addr,
Z80EX_BYTE  value 
)

Definition at line 136 of file primo.c.

◆ z80ex_pread_cb()

Z80EX_BYTE z80ex_pread_cb ( Z80EX_WORD  port16)

Definition at line 145 of file primo.c.

◆ z80ex_pwrite_cb()

void z80ex_pwrite_cb ( Z80EX_WORD  port16,
Z80EX_BYTE  value 
)

Definition at line 177 of file primo.c.

◆ z80ex_reti_cb()

void z80ex_reti_cb ( void  )

Definition at line 226 of file primo.c.

Variable Documentation

◆ clock

int clock

Definition at line 86 of file primo.c.

◆ clock_mhz

double clock_mhz

Definition at line 103 of file primo.c.

◆ clocking_timeout

Uint64 clocking_timeout

Definition at line 88 of file primo.c.

◆ disasm

int disasm

Definition at line 102 of file primo.c.

◆ expram

Uint8 expram[0x4000]

Definition at line 46 of file primo.c.

◆ exprom

Uint8 exprom[0x8000]

Definition at line 45 of file primo.c.

◆ exprom_fn

char* exprom_fn

Definition at line 107 of file primo.c.

◆ fullscreen

int fullscreen

Definition at line 102 of file primo.c.

◆ gui_selection

char* gui_selection

Definition at line 108 of file primo.c.

◆ instance

int instance

Definition at line 89 of file primo.c.

◆ last_clocked

Uint64 last_clocked

Definition at line 87 of file primo.c.

◆ main

Uint8 main[0x10000]

Definition at line 44 of file primo.c.

◆ memory

struct { ... } memory

Definition at line 43 of file commodore_65.c.

◆ model_name

char* model_name

Definition at line 104 of file primo.c.

◆ pri_name

char* pri_name

Definition at line 106 of file primo.c.

◆ rd_p

Uint8 * rd_p[4]

Definition at line 42 of file primo.c.

◆ rdempty

Uint8 rdempty[0x4000]

Definition at line 48 of file primo.c.

◆ rom_fn

char* rom_fn

Definition at line 105 of file primo.c.

◆ sdlrenderquality

int sdlrenderquality

Definition at line 102 of file primo.c.

◆ serial

int serial = 2 | 8 | 16 | 32

Definition at line 142 of file primo.c.

◆ step

int step

Definition at line 85 of file primo.c.

◆ syscon

int syscon

Definition at line 102 of file primo.c.

◆ vid16k

Uint8* vid16k

Definition at line 43 of file primo.c.

◆ wr_p

Uint8* wr_p[4]

Definition at line 42 of file primo.c.

◆ wrwaste

Uint8 wrwaste[0x4000]

Definition at line 47 of file primo.c.

◆ z80ex

Definition at line 37 of file primo.c.