]> Shamusworld >> Repos - virtualjaguar/blob - src/jerry.h
Initial changeset to experimental branch
[virtualjaguar] / src / jerry.h
1 //
2 // JERRY.H: Header file
3 //
4
5 #ifndef __JERRY_H__
6 #define __JERRY_H__
7
8 //#include "types.h"
9 #include "memory.h"
10
11 void JERRYInit(void);
12 void JERRYReset(void);
13 void JERRYDone(void);
14
15 uint8 JERRYReadByte(uint32 offset, uint32 who = UNKNOWN);
16 uint16 JERRYReadWord(uint32 offset, uint32 who = UNKNOWN);
17 void JERRYWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN);
18 void JERRYWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN);
19
20 void JERRYExecPIT(uint32 cycles);
21 void JERRYI2SExec(uint32 cycles);
22
23 // 68000 Interrupt bit positions (enabled at $F10020)
24
25 enum { IRQ2_EXTERNAL = 0, IRQ2_DSP, IRQ2_TIMER1, IRQ2_TIMER2, IRQ2_ASI, IRQ2_SSI };
26
27 bool JERRYIRQEnabled(int irq);
28 void JERRYSetPendingIRQ(int irq);
29
30 // This should stay inside this file, but it's here for now...
31 // Need to set up an interface function so that this can go back
32 void JERRYI2SCallback(void);
33
34 // External variables
35
36 extern uint32 JERRYI2SInterruptDivide;
37 extern int32 JERRYI2SInterruptTimer;
38
39 #endif