more header cleaning

This commit is contained in:
Gwenhael Le Moine 2024-04-14 22:23:02 +02:00
parent 97531743dd
commit 9ac914c996
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
12 changed files with 12 additions and 21 deletions

View file

@ -1,4 +1,5 @@
#include <string.h>
#include <stdbool.h>
#include "types.h"
#include "hdw.h"

View file

@ -31,9 +31,7 @@ typedef struct {
static CycleEvent cycle_events[] = {
{0, 16, timer1_update },
#ifndef true_TIMER2
{0, 8192, timer2_update },
#endif
{0, 4096, display_update},
{0, 0, NULL }
};
@ -123,14 +121,14 @@ bool emulator_run( void )
throttle( config.real_speed || cpu.keyintp );
if ( emulator_state == EMULATOR_STEP ) {
if ( emulator_state == EMULATOR_STEP )
emulator_set_state( EMULATOR_STOP );
}
} else {
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 );
}
cpu.cycles += delta;
}

View file

@ -8,7 +8,6 @@
enum EmulatorStates { EMULATOR_STOP, EMULATOR_STEP, EMULATOR_RUN };
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_exit( char* fn_rom, char* fn_ram, char* fn_port1, char* fn_port2 );

View file

@ -8,12 +8,10 @@
#include <sys/stat.h>
#include <pwd.h>
#include "gui.h"
#include "rpl.h"
#include "files.h"
#include "bus.h"
#include "ports.h"
#include "config.h"
#include "types.h"
#define MAX_LENGTH_FILENAME 2048
@ -21,7 +19,6 @@ extern byte current_bank;
extern byte* port2;
extern address port2mask;
/* char WorkingPath[ MAX_LENGTH_FILENAME ]; */
char absolute_working_dir_path[ MAX_LENGTH_FILENAME ];
static address ram_size = 256 * 1024; // in nibbles, not bytes!

View file

@ -1,5 +1,5 @@
#ifndef __PFILES_H
#define __PFILES_H
#ifndef __FILES_H
#define __FILES_H
extern void get_absolute_working_dir_path();

View file

@ -7,9 +7,8 @@
#include "config.h"
#include "keyboard.h"
#include "files.h"
#include "gui.h"
#include "emulator.h"
#include "emulator.h" /* for please_exit */
#include "display.h"
#define PANEL_FLAG_VISIBLE 0x01

View file

@ -3,7 +3,6 @@
#include "ports.h"
#include "timers.h"
#include "display.h"
#include "hdw.h"
static byte hdw_ram[ 64 ];

View file

@ -1,7 +1,7 @@
#include "types.h"
#include "cpu.h"
#include "keyboard.h"
#include "files.h"
bool kbd_on;
static byte kbd_row[ 9 ];

View file

@ -3,7 +3,7 @@
#include <string.h>
#include "emulator.h"
#include "types.h"
#include "cpu.h"
inline void load( byte* reg, byte* data, int start, int len )

View file

@ -1,8 +1,8 @@
#include <stdlib.h>
#include <stdbool.h>
#include "types.h"
#include "bus.h"
#include "ports.h"
byte current_bank;
byte* port2;

View file

@ -3,7 +3,6 @@
#include "types.h"
#include "bus.h"
#include "opinline.h"
#include "rpl.h"
#define TEMPOB 0x806E9
#define TEMPTOP 0x806EE

View file

@ -1,6 +1,5 @@
#include "types.h"
#include "cpu.h"
#include "timers.h"
#define TIMER1_EXTRA 0x1
#define TIMER1_INT 0x2