Mercurial > repos > blastem
comparison lc8951.h @ 2062:07ed42bd7b4c segacd
Some progress on CDC and CDD emulation. Now passes first 3 "CDC INIT" tests in mcd-verificator
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 28 Jan 2022 00:50:17 -0800 |
parents | 70260f6051dd |
children | 02a9846668d1 |
comparison
equal
deleted
inserted
replaced
2061:7c1760b5b3e5 | 2062:07ed42bd7b4c |
---|---|
2 #define LC8951_H_ | 2 #define LC8951_H_ |
3 | 3 |
4 #include <stdint.h> | 4 #include <stdint.h> |
5 | 5 |
6 typedef struct { | 6 typedef struct { |
7 uint32_t cycles; | 7 uint32_t cycle; |
8 uint32_t clock_step; | |
9 uint32_t decode_end; | |
10 uint32_t transfer_end; | |
8 | 11 |
9 uint8_t buffer[0x4000]; | 12 uint8_t buffer[0x4000]; |
10 | 13 |
11 uint8_t regs[16]; | 14 uint8_t regs[16]; |
12 uint8_t comin[8]; | 15 uint8_t comin[8]; |
17 uint8_t ifctrl; | 20 uint8_t ifctrl; |
18 uint8_t ctrl0; | 21 uint8_t ctrl0; |
19 uint8_t ctrl1; | 22 uint8_t ctrl1; |
20 uint8_t ar; | 23 uint8_t ar; |
21 uint8_t ar_mask; | 24 uint8_t ar_mask; |
25 uint8_t decoding; | |
26 uint16_t ptl_internal; | |
22 } lc8951; | 27 } lc8951; |
23 | 28 |
24 void lc8951_init(lc8951 *context); | 29 void lc8951_init(lc8951 *context); |
25 //void lc8951_run(lc8951 *context, uint32_t cycle); | 30 void lc8951_run(lc8951 *context, uint32_t cycle); |
26 void lc8951_reg_write(lc8951 *context, uint8_t value); | 31 void lc8951_reg_write(lc8951 *context, uint8_t value); |
27 uint8_t lc8951_reg_read(lc8951 *context); | 32 uint8_t lc8951_reg_read(lc8951 *context); |
28 void lc8951_ar_write(lc8951 *context, uint8_t value); | 33 void lc8951_ar_write(lc8951 *context, uint8_t value); |
34 void lc8951_write_byte(lc8951 *context, uint32_t cycle, int sector_offset, uint8_t byte); | |
35 uint32_t lc8951_next_interrupt(lc8951 *context); | |
29 | 36 |
30 #endif //LC8951_H_ | 37 #endif //LC8951_H_ |