OSDN Git Service

[VM][FMTOWNS] Make VMs working except plane VRAM accessing.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 25 Mar 2023 07:15:54 +0000 (16:15 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 25 Mar 2023 07:15:54 +0000 (16:15 +0900)
[VM][FMTOWNS][OOPS] I forgot to numbers of PIC:I8259.
[VM][FMTOWNS][OOPS] I forgot to set device_model of I8253.

source/src/vm/fmtowns/fmtowns.cpp
source/src/vm/fmtowns/fmtowns.h

index f9286c4..153e733 100644 (file)
@@ -179,8 +179,13 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
 
        sio = new I8251(this, emu);
        pit0 = new I8253(this, emu);
+       pit0->device_model = INTEL_8253;
+
        pit1 = new I8253(this, emu);
+       pit1->device_model = INTEL_8253;
+
        pic = new I8259(this, emu);
+       pic->num_chips = 2;
        fdc = new MB8877(this, emu);
        rtc = new MSM58321(this, emu);
        beep = new PCM1BIT(this, emu);
@@ -338,6 +343,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
        scsi_host->set_context_drq(scsi, SIG_SCSI_DRQ, 1);
        scsi_host->set_context_drq(keyboard, SIG_KEYBOARD_BOOTSEQ_END, 1);
 
+       dma->set_context_cpu(cpu);
        dma->set_context_memory(memory);
        dma->set_context_ch0(fdc);
        dma->set_context_ch1(scsi_host);
@@ -345,9 +351,11 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
        dma->set_context_ch3(cdrom);
        dma->set_context_tc1(scsi, SIG_SCSI_EOT, 0xffffffff);
        dma->set_context_tc3(cdrom, SIG_TOWNS_CDROM_DMAINT, 0xffffffff);
+
+       dma->set_context_ack1(scsi_host, SIG_SCSI_ACK, 0xffffffff);
        dma->set_context_ack3(cdrom, SIG_TOWNS_CDROM_DMAACK, 0xffffffff);
 
-       dma->set_context_ube1(scsi_host, SIG_SCSI_16BIT_BUS, 0x02);
+       //dma->set_context_ube1(scsi_host, SIG_SCSI_16BIT_BUS, 0x02);
 
        dma->set_context_child_dma(extra_dma);
 
index 913a479..5c42675 100644 (file)
 
 #define _MEMORY_BANK_SIZE 0x1000
 #if defined(WITH_386SX)
-#define _MEMORY_SPACE 0x001000000 /* 16MB */
+#define _MEMORY_SPACE 0x01000000 /* 16MB */
 #define _MEMORY_BUS_WIDTH 16
 #else
-#define _MEMORY_SPACE 0x100000000 /* 4GiB */
-#define _MEMORY_BUS_WIDTH 16
+#define _MEMORY_SPACE 0x100000000LL /* 4GiB */
+#define _MEMORY_BUS_WIDTH 32
 #endif
 
 #define _IO_SPACE     0x10000
 #define USE_COMPACT_DISC 1
 
 #define MAX_MEMCARD            2
-#define I8259_MAX_CHIPS                2
 //#define I8259_PC98_HACK
 
 //#define SINGLE_MODE_DMA
 #define MB8877_NO_BUSY_AFTER_SEEK
-#define IO_ADDR_MAX            0x10000
 #define SCSI_HOST_AUTO_ACK
 //#define SCSI_HOST_WIDE
 //#define _SCSI_DEBUG_LOG