Mercurial > repos > blastem
comparison lc8951.h @ 2130:28b6453cf7e3
Emulate CDC sync detection and sync insertion rather than relying on external knowledge about sector offset
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 15 Mar 2022 08:58:04 -0700 |
parents | f22e04b69272 |
children | 10e4439d8f13 |
comparison
equal
deleted
inserted
replaced
2129:4c9e447aa25b | 2130:28b6453cf7e3 |
---|---|
10 void *handler_data; | 10 void *handler_data; |
11 uint32_t cycle; | 11 uint32_t cycle; |
12 uint32_t clock_step; | 12 uint32_t clock_step; |
13 uint32_t decode_end; | 13 uint32_t decode_end; |
14 uint32_t transfer_end; | 14 uint32_t transfer_end; |
15 uint16_t sector_counter; | |
15 | 16 |
16 uint8_t buffer[0x4000]; | 17 uint8_t buffer[0x4000]; |
17 | 18 |
18 uint8_t regs[16]; | 19 uint8_t regs[16]; |
19 uint8_t comin[8]; | 20 uint8_t comin[8]; |
24 uint8_t ifctrl; | 25 uint8_t ifctrl; |
25 uint8_t ctrl0; | 26 uint8_t ctrl0; |
26 uint8_t ctrl1; | 27 uint8_t ctrl1; |
27 uint8_t ar; | 28 uint8_t ar; |
28 uint8_t ar_mask; | 29 uint8_t ar_mask; |
30 uint8_t sync_counter; | |
29 } lc8951; | 31 } lc8951; |
30 | 32 |
31 void lc8951_init(lc8951 *context, lcd8951_byte_recv_fun byte_handler, void *handler_data); | 33 void lc8951_init(lc8951 *context, lcd8951_byte_recv_fun byte_handler, void *handler_data); |
32 void lc8951_run(lc8951 *context, uint32_t cycle); | 34 void lc8951_run(lc8951 *context, uint32_t cycle); |
33 void lc8951_reg_write(lc8951 *context, uint8_t value); | 35 void lc8951_reg_write(lc8951 *context, uint8_t value); |