mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
swim: split into separate IWM and ISM register blocks
The swim chip provides an implementation of both Apple's IWM and ISM floppy disk controllers. Split the existing implementation into separate register banks for each controller, whilst also switching the IWM registers from 16-bit to 8-bit as implemented in real hardware. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-ID: <20231004083806.757242-13-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
d05cad2bf6
commit
5700420417
3 changed files with 58 additions and 46 deletions
|
@ -43,23 +43,18 @@ typedef struct FDrive {
|
|||
} FDrive;
|
||||
|
||||
struct SWIMCtrl {
|
||||
MemoryRegion iomem;
|
||||
MemoryRegion swim;
|
||||
MemoryRegion iwm;
|
||||
MemoryRegion ism;
|
||||
FDrive drives[SWIM_MAX_FD];
|
||||
int mode;
|
||||
/* IWM mode */
|
||||
int iwm_switch;
|
||||
uint16_t regs[8];
|
||||
#define IWM_PH0 0
|
||||
#define IWM_PH1 1
|
||||
#define IWM_PH2 2
|
||||
#define IWM_PH3 3
|
||||
#define IWM_MTR 4
|
||||
#define IWM_DRIVE 5
|
||||
#define IWM_Q6 6
|
||||
#define IWM_Q7 7
|
||||
uint8_t iwmregs[16];
|
||||
uint8_t iwm_data;
|
||||
uint8_t iwm_mode;
|
||||
/* SWIM mode */
|
||||
uint8_t ismregs[16];
|
||||
uint8_t swim_phase;
|
||||
uint8_t swim_mode;
|
||||
SWIMBus bus;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue