PDM: factory test control.

This commit is contained in:
Maxim Poliakovski 2022-07-20 01:36:05 +02:00
parent b9fb0b9c5f
commit 3c062443f6
4 changed files with 9 additions and 1 deletions

View File

@ -95,6 +95,9 @@ int AMIC::device_postinit()
this->viacuda->assert_ctrl_line(ViaLine::CA1); this->viacuda->assert_ctrl_line(ViaLine::CA1);
}); });
// set EMMO pin status (active low)
this->emmo_pin = GET_BIN_PROP("emmo") ^ 1;
return 0; return 0;
} }
@ -156,7 +159,7 @@ uint32_t AMIC::read(uint32_t reg_start, uint32_t offset, int size)
case AMICReg::Int_Ctrl: case AMICReg::Int_Ctrl:
return (this->int_ctrl & 0xC0) | (this->dev_irq_lines & 0x3F); return (this->int_ctrl & 0xC0) | (this->dev_irq_lines & 0x3F);
case AMICReg::Diag_Reg: case AMICReg::Diag_Reg:
return 0xFFU; // this value allows the machine to boot normally return 0xFE | this->emmo_pin;
case AMICReg::DMA_Base_Addr_0: case AMICReg::DMA_Base_Addr_0:
case AMICReg::DMA_Base_Addr_1: case AMICReg::DMA_Base_Addr_1:
case AMICReg::DMA_Base_Addr_2: case AMICReg::DMA_Base_Addr_2:

View File

@ -208,6 +208,8 @@ protected:
private: private:
uint8_t imm_snd_regs[4]; // temporary storage for sound control registers uint8_t imm_snd_regs[4]; // temporary storage for sound control registers
uint8_t emmo_pin; // EMMO aka factory tester pin status, active low
uint32_t dma_base = 0; // DMA physical base address uint32_t dma_base = 0; // DMA physical base address
uint16_t snd_buf_size = 0; // sound buffer size in bytes uint16_t snd_buf_size = 0; // sound buffer size in bytes
uint8_t snd_out_ctrl = 0; uint8_t snd_out_ctrl = 0;

View File

@ -80,6 +80,7 @@ static const map<string, string> PropHelp = {
{"fdd_wr_prot", "toggles floppy disk's write protection"}, {"fdd_wr_prot", "toggles floppy disk's write protection"},
{"mon_id", "specifies which monitor to emulate"}, {"mon_id", "specifies which monitor to emulate"},
{"serial_backend", "specifies the backend for the serial port"}, {"serial_backend", "specifies the backend for the serial port"},
{"emmo", "enables/disables factory HW tests during startup"},
}; };
bool MachineFactory::add(const string& machine_id, MachineDescription desc) bool MachineFactory::add(const string& machine_id, MachineDescription desc)

View File

@ -102,6 +102,8 @@ static const PropMap pm6100_settings = {
new IntProperty(0, vector<uint32_t>({0, 8, 16, 32, 64, 128}))}, new IntProperty(0, vector<uint32_t>({0, 8, 16, 32, 64, 128}))},
{"mon_id", {"mon_id",
new StrProperty("HiRes12-14in", PDMBuiltinMonitorIDs)}, new StrProperty("HiRes12-14in", PDMBuiltinMonitorIDs)},
{"emmo",
new BinProperty(0)},
}; };
static vector<string> pm6100_devices = { static vector<string> pm6100_devices = {