notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
region detection, cd states wip, fixes, stuff
[picodrive.git]
/
Pico
/
PicoInt.h
diff --git
a/Pico/PicoInt.h
b/Pico/PicoInt.h
index
7d91df7
..
2be566b
100644
(file)
--- a/
Pico/PicoInt.h
+++ b/
Pico/PicoInt.h
@@
-13,7
+13,7
@@
#include "Pico.h"
\r
\r
\r
#include "Pico.h"
\r
\r
\r
-// to select core, define EMU_C68K, EMU_M68K or EMU_A68K in your makefile
\r
+// to select core, define EMU_C68K, EMU_M68K or EMU_A68K in your makefile
or project
\r
\r
#ifdef __cplusplus
\r
extern "C" {
\r
\r
#ifdef __cplusplus
\r
extern "C" {
\r
@@
-23,10
+23,11
@@
extern "C" {
// ----------------------- 68000 CPU -----------------------
\r
#ifdef EMU_C68K
\r
#include "../cpu/Cyclone/Cyclone.h"
\r
// ----------------------- 68000 CPU -----------------------
\r
#ifdef EMU_C68K
\r
#include "../cpu/Cyclone/Cyclone.h"
\r
-extern struct Cyclone PicoCpu;
\r
+extern struct Cyclone PicoCpu
, PicoCpuS68k
;
\r
#define SekCyclesLeft PicoCpu.cycles // cycles left for this run
\r
#define SekSetCyclesLeft(c) PicoCpu.cycles=c
\r
#define SekPc (PicoCpu.pc-PicoCpu.membase)
\r
#define SekCyclesLeft PicoCpu.cycles // cycles left for this run
\r
#define SekSetCyclesLeft(c) PicoCpu.cycles=c
\r
#define SekPc (PicoCpu.pc-PicoCpu.membase)
\r
+#define SekPcS68k (PicoCpuS68k.pc-PicoCpuS68k.membase)
\r
#endif
\r
\r
#ifdef EMU_A68K
\r
#endif
\r
\r
#ifdef EMU_A68K
\r
@@
-123,7
+124,9
@@
struct PicoMisc
unsigned char sram_cycle; // EEPROM SRAM cycle number
\r
unsigned char sram_slave; // EEPROM slave word for X24C02 and better SRAMs
\r
unsigned char prot_bytes[2]; // simple protection fakeing
\r
unsigned char sram_cycle; // EEPROM SRAM cycle number
\r
unsigned char sram_slave; // EEPROM slave word for X24C02 and better SRAMs
\r
unsigned char prot_bytes[2]; // simple protection fakeing
\r
- unsigned char pad1[8];
\r
+ unsigned short dma_bytes; //
\r
+ unsigned char pad[2];
\r
+ unsigned int frame_count; // mainly for movies
\r
};
\r
\r
// some assembly stuff depend on these, do not touch!
\r
};
\r
\r
// some assembly stuff depend on these, do not touch!
\r
@@
-159,24
+162,44
@@
struct PicoSRAM
// MCD
\r
#include "cd/cd_sys.h"
\r
#include "cd/LC89510.h"
\r
// MCD
\r
#include "cd/cd_sys.h"
\r
#include "cd/LC89510.h"
\r
+#include "cd/gfx_cd.h"
\r
+
\r
+struct mcd_misc
\r
+{
\r
+ unsigned short hint_vector;
\r
+ unsigned char busreq;
\r
+ unsigned char s68k_pend_ints;
\r
+ unsigned int state_flags; // emu state: reset_pending,
\r
+ unsigned int counter75hz;
\r
+
\r
+};
\r
\r
typedef struct
\r
{
\r
\r
typedef struct
\r
{
\r
- unsigned char bios[0x20000];
\r
+ unsigned char bios[0x20000];
// 128K
\r
union {
\r
union {
\r
- unsigned char prg_ram[0x80000];
\r
+ unsigned char prg_ram[0x80000];
// 512K
\r
unsigned char prg_ram_b[4][0x20000];
\r
};
\r
unsigned char prg_ram_b[4][0x20000];
\r
};
\r
- unsigned char word_ram[0x40000];
\r
+ unsigned char word_ram[0x40000]; // 256K
\r
+ unsigned char bram[0x2000]; // 8K
\r
unsigned char s68k_regs[0x200];
\r
unsigned char s68k_regs[0x200];
\r
- unsigned char m68k_regs[0x10];
\r
CDD cdd;
\r
CDC cdc;
\r
_scd scd;
\r
CDD cdd;
\r
CDC cdc;
\r
_scd scd;
\r
+ Rot_Comp rot_comp;
\r
+ struct mcd_misc m;
\r
} mcd_state;
\r
\r
#define Pico_mcd ((mcd_state *)Pico.rom)
\r
\r
} mcd_state;
\r
\r
#define Pico_mcd ((mcd_state *)Pico.rom)
\r
\r
+// Area.c
\r
+int PicoAreaPackCpu(unsigned char *cpu, int is_sub);
\r
+int PicoAreaUnpackCpu(unsigned char *cpu, int is_sub);
\r
+
\r
+// cd/Area.c
\r
+int PicoCdSaveState(void *file);
\r
+int PicoCdLoadState(void *file);
\r
\r
// Draw.c
\r
int PicoLine(int scan);
\r
\r
// Draw.c
\r
int PicoLine(int scan);
\r
@@
-188,15
+211,16
@@
void PicoFrameFull();
// Memory.c
\r
int PicoInitPc(unsigned int pc);
\r
unsigned int CPU_CALL PicoRead32(unsigned int a);
\r
// Memory.c
\r
int PicoInitPc(unsigned int pc);
\r
unsigned int CPU_CALL PicoRead32(unsigned int a);
\r
-
int PicoMemInit
();
\r
+
void PicoMemSetup
();
\r
void PicoMemReset();
\r
void PicoMemReset();
\r
-void PicoDasm(int start,int len);
\r
+
//
void PicoDasm(int start,int len);
\r
unsigned char z80_read(unsigned short a);
\r
unsigned short z80_read16(unsigned short a);
\r
void z80_write(unsigned char data, unsigned short a);
\r
void z80_write16(unsigned short data, unsigned short a);
\r
\r
// cd/Memory.c
\r
unsigned char z80_read(unsigned short a);
\r
unsigned short z80_read16(unsigned short a);
\r
void z80_write(unsigned char data, unsigned short a);
\r
void z80_write16(unsigned short data, unsigned short a);
\r
\r
// cd/Memory.c
\r
+void PicoMemSetupCD();
\r
unsigned char PicoReadCD8 (unsigned int a);
\r
unsigned short PicoReadCD16(unsigned int a);
\r
unsigned int PicoReadCD32(unsigned int a);
\r
unsigned char PicoReadCD8 (unsigned int a);
\r
unsigned short PicoReadCD16(unsigned int a);
\r
unsigned int PicoReadCD32(unsigned int a);
\r
@@
-208,6
+232,7
@@
void PicoWriteCD32(unsigned int a, unsigned int d);
extern struct Pico Pico;
\r
extern struct PicoSRAM SRam;
\r
extern int emustatus;
\r
extern struct Pico Pico;
\r
extern struct PicoSRAM SRam;
\r
extern int emustatus;
\r
+int CheckDMA(void);
\r
\r
// cd/Pico.c
\r
int PicoInitMCD(void);
\r
\r
// cd/Pico.c
\r
int PicoInitMCD(void);
\r