1.1 diff -r e5a92d7beecf -r a350dfa92895 src/state.h 1.2 --- a/src/state.h Sun Dec 05 16:18:50 2010 +0000 1.3 +++ b/src/state.h Sun Dec 05 16:20:00 2010 +0000 1.4 @@ -4,6 +4,7 @@ 1.5 #include <stddef.h> 1.6 #include <stdint.h> 1.7 #include <stdbool.h> 1.8 +#include "wd279x.h" 1.9 1.10 // Maximum size of the Boot PROMs. Must be a binary power of two. 1.11 #define ROM_SIZE 32768 1.12 @@ -17,30 +18,37 @@ 1.13 // Boot PROM can be up to 32Kbytes total size 1.14 uint8_t rom[ROM_SIZE]; ///< Boot PROM data buffer 1.15 1.16 - // Main system RAM 1.17 + //// Main system RAM 1.18 uint8_t *ram; ///< RAM data buffer 1.19 size_t ram_size; ///< Size of RAM buffer in bytes 1.20 1.21 - // Video RAM 1.22 - uint8_t vram[0x8000]; ///< Video RAM 1.23 + /// Video RAM 1.24 + uint8_t vram[0x8000]; 1.25 1.26 - // Map RAM 1.27 - uint8_t map[0x800]; ///< Map RAM 1.28 + /// Map RAM 1.29 + uint8_t map[0x800]; 1.30 1.31 - // Registers 1.32 + //// Registers 1.33 uint16_t genstat; ///< General Status Register 1.34 uint16_t bsr0; ///< Bus Status Register 0 1.35 uint16_t bsr1; ///< Bus Status Register 1 1.36 1.37 - // MISCELLANEOUS CONTROL REGISTER 1.38 + //// MISCELLANEOUS CONTROL REGISTER 1.39 + bool dma_reading; ///< True if Disc DMA reads from the controller, false otherwise 1.40 uint8_t leds; ///< LED status, 1=on, in order red3/green2/yellow1/red0 from bit3 to bit0 1.41 1.42 - // GENERAL CONTROL REGISTER 1.43 + //// GENERAL CONTROL REGISTER 1.44 /// GENCON.ROMLMAP -- false ORs the address with 0x800000, forcing the 1.45 /// 68010 to access ROM instead of RAM when booting. TRM page 2-36. 1.46 bool romlmap; 1.47 /// GENCON.PIE -- Parity Error Check Enable 1.48 bool pie; 1.49 + 1.50 + /// DMA Address Register 1.51 + uint32_t dma_address; 1.52 + 1.53 + /// Floppy disc controller context 1.54 + WD2797_CTX fdc_ctx; 1.55 } S_state; 1.56 1.57 // Global emulator state. Yes, I know global variables are evil, please don't