more header cleaning
This commit is contained in:
parent
97531743dd
commit
9ac914c996
12 changed files with 12 additions and 21 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "hdw.h"
|
#include "hdw.h"
|
||||||
|
|
|
@ -31,9 +31,7 @@ typedef struct {
|
||||||
|
|
||||||
static CycleEvent cycle_events[] = {
|
static CycleEvent cycle_events[] = {
|
||||||
{0, 16, timer1_update },
|
{0, 16, timer1_update },
|
||||||
#ifndef true_TIMER2
|
|
||||||
{0, 8192, timer2_update },
|
{0, 8192, timer2_update },
|
||||||
#endif
|
|
||||||
{0, 4096, display_update},
|
{0, 4096, display_update},
|
||||||
{0, 0, NULL }
|
{0, 0, NULL }
|
||||||
};
|
};
|
||||||
|
@ -123,14 +121,14 @@ bool emulator_run( void )
|
||||||
|
|
||||||
throttle( config.real_speed || cpu.keyintp );
|
throttle( config.real_speed || cpu.keyintp );
|
||||||
|
|
||||||
if ( emulator_state == EMULATOR_STEP ) {
|
if ( emulator_state == EMULATOR_STEP )
|
||||||
emulator_set_state( EMULATOR_STOP );
|
emulator_set_state( EMULATOR_STOP );
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
delta = MAX_DELTA;
|
delta = MAX_DELTA;
|
||||||
for ( cep = cycle_events; cep->proc; cep++ ) {
|
for ( cep = cycle_events; cep->proc; cep++ )
|
||||||
delta = MIN( delta, cep->next - cpu.cycles + 1 );
|
delta = MIN( delta, cep->next - cpu.cycles + 1 );
|
||||||
}
|
|
||||||
cpu.cycles += delta;
|
cpu.cycles += delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
enum EmulatorStates { EMULATOR_STOP, EMULATOR_STEP, EMULATOR_RUN };
|
enum EmulatorStates { EMULATOR_STOP, EMULATOR_STEP, EMULATOR_RUN };
|
||||||
|
|
||||||
extern volatile bool please_exit;
|
extern volatile bool please_exit;
|
||||||
extern dword emulator_speed;
|
|
||||||
|
|
||||||
extern void emulator_init( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 );
|
extern void emulator_init( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 );
|
||||||
extern void emulator_exit( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 );
|
extern void emulator_exit( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 );
|
||||||
|
|
|
@ -8,12 +8,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
#include "gui.h"
|
|
||||||
#include "rpl.h"
|
#include "rpl.h"
|
||||||
#include "files.h"
|
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
#include "ports.h"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
#define MAX_LENGTH_FILENAME 2048
|
#define MAX_LENGTH_FILENAME 2048
|
||||||
|
|
||||||
|
@ -21,7 +19,6 @@ extern byte current_bank;
|
||||||
extern byte* port2;
|
extern byte* port2;
|
||||||
extern address port2mask;
|
extern address port2mask;
|
||||||
|
|
||||||
/* char WorkingPath[ MAX_LENGTH_FILENAME ]; */
|
|
||||||
char absolute_working_dir_path[ MAX_LENGTH_FILENAME ];
|
char absolute_working_dir_path[ MAX_LENGTH_FILENAME ];
|
||||||
|
|
||||||
static address ram_size = 256 * 1024; // in nibbles, not bytes!
|
static address ram_size = 256 * 1024; // in nibbles, not bytes!
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef __PFILES_H
|
#ifndef __FILES_H
|
||||||
#define __PFILES_H
|
#define __FILES_H
|
||||||
|
|
||||||
extern void get_absolute_working_dir_path();
|
extern void get_absolute_working_dir_path();
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,8 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "files.h"
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "emulator.h"
|
#include "emulator.h" /* for please_exit */
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
#define PANEL_FLAG_VISIBLE 0x01
|
#define PANEL_FLAG_VISIBLE 0x01
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "ports.h"
|
#include "ports.h"
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "hdw.h"
|
|
||||||
|
|
||||||
static byte hdw_ram[ 64 ];
|
static byte hdw_ram[ 64 ];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "keyboard.h"
|
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
|
||||||
bool kbd_on;
|
bool kbd_on;
|
||||||
|
|
||||||
static byte kbd_row[ 9 ];
|
static byte kbd_row[ 9 ];
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "emulator.h"
|
#include "types.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
inline void load( byte* reg, byte* data, int start, int len )
|
inline void load( byte* reg, byte* data, int start, int len )
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
#include "ports.h"
|
|
||||||
|
|
||||||
byte current_bank;
|
byte current_bank;
|
||||||
byte* port2;
|
byte* port2;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
#include "opinline.h"
|
#include "opinline.h"
|
||||||
#include "rpl.h"
|
|
||||||
|
|
||||||
#define TEMPOB 0x806E9
|
#define TEMPOB 0x806E9
|
||||||
#define TEMPTOP 0x806EE
|
#define TEMPTOP 0x806EE
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "timers.h"
|
|
||||||
|
|
||||||
#define TIMER1_EXTRA 0x1
|
#define TIMER1_EXTRA 0x1
|
||||||
#define TIMER1_INT 0x2
|
#define TIMER1_INT 0x2
|
||||||
|
|
Loading…
Reference in a new issue