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