Commit | Line | Data |
---|---|---|
cf76e892 JPM |
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 | void JERRYDumpIORegistersToLog(void); | |
15 | ||
16 | uint8_t JERRYReadByte(uint32_t offset, uint32_t who = UNKNOWN); | |
17 | uint16_t JERRYReadWord(uint32_t offset, uint32_t who = UNKNOWN); | |
18 | void JERRYWriteByte(uint32_t offset, uint8_t data, uint32_t who = UNKNOWN); | |
19 | void JERRYWriteWord(uint32_t offset, uint16_t data, uint32_t who = UNKNOWN); | |
20 | ||
21 | void JERRYExecPIT(uint32_t cycles); | |
22 | void JERRYI2SExec(uint32_t cycles); | |
23 | ||
24 | int JERRYGetPIT1Frequency(void); | |
25 | int JERRYGetPIT2Frequency(void); | |
26 | ||
27 | // 68000 Interrupt bit positions (enabled at $F10020) | |
28 | ||
29 | //enum { IRQ2_EXTERNAL = 0, IRQ2_DSP, IRQ2_TIMER1, IRQ2_TIMER2, IRQ2_ASI, IRQ2_SSI }; | |
30 | enum { IRQ2_EXTERNAL=0x01, IRQ2_DSP=0x02, IRQ2_TIMER1=0x04, IRQ2_TIMER2=0x08, IRQ2_ASI=0x10, IRQ2_SSI=0x20 }; | |
31 | ||
32 | bool JERRYIRQEnabled(int irq); | |
33 | void JERRYSetPendingIRQ(int irq); | |
34 | ||
35 | // This should stay inside this file, but it's here for now... | |
36 | // Need to set up an interface function so that this can go back | |
37 | void JERRYI2SCallback(void); | |
38 | ||
39 | // External variables | |
40 | ||
41 | //extern uint32_t JERRYI2SInterruptDivide; | |
42 | extern int32_t JERRYI2SInterruptTimer; | |
43 | ||
44 | #endif |