mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
32x: new SH2 memory handling, hopefully faster
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@817 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
6add7875b5
commit
bcf65fd674
7 changed files with 377 additions and 221 deletions
|
@ -1,16 +1,6 @@
|
|||
#ifndef __SH2_H__
|
||||
#define __SH2_H__
|
||||
|
||||
// pico memhandlers
|
||||
// XXX: move somewhere else
|
||||
unsigned int p32x_sh2_read8(unsigned int a, int id);
|
||||
unsigned int p32x_sh2_read16(unsigned int a, int id);
|
||||
unsigned int p32x_sh2_read32(unsigned int a, int id);
|
||||
void p32x_sh2_write8(unsigned int a, unsigned int d, int id);
|
||||
void p32x_sh2_write16(unsigned int a, unsigned int d, int id);
|
||||
void p32x_sh2_write32(unsigned int a, unsigned int d, int id);
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int r[16]; // 00
|
||||
|
@ -27,10 +17,15 @@ typedef struct
|
|||
unsigned int delay;
|
||||
unsigned int test_irq;
|
||||
|
||||
// drc stuff
|
||||
void **pc_hashtab; // 70
|
||||
|
||||
// common
|
||||
void *read8_map; // 70
|
||||
void *read16_map;
|
||||
void *write8_map;
|
||||
void *write16_map;
|
||||
|
||||
// drc stuff
|
||||
void **pc_hashtab; // 80
|
||||
|
||||
int pending_level; // MAX(pending_irl, pending_int_irq)
|
||||
int pending_irl;
|
||||
int pending_int_irq; // internal irq
|
||||
|
@ -53,4 +48,13 @@ void sh2_do_irq(SH2 *sh2, int level, int vector);
|
|||
|
||||
void sh2_execute(SH2 *sh2, int cycles);
|
||||
|
||||
// pico memhandlers
|
||||
// XXX: move somewhere else
|
||||
unsigned int p32x_sh2_read8(unsigned int a, SH2 *sh2);
|
||||
unsigned int p32x_sh2_read16(unsigned int a, SH2 *sh2);
|
||||
unsigned int p32x_sh2_read32(unsigned int a, SH2 *sh2);
|
||||
void p32x_sh2_write8(unsigned int a, unsigned int d, SH2 *sh2);
|
||||
void p32x_sh2_write16(unsigned int a, unsigned int d, SH2 *sh2);
|
||||
void p32x_sh2_write32(unsigned int a, unsigned int d, SH2 *sh2);
|
||||
|
||||
#endif /* __SH2_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue