mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
srcclean in preparation for branching 0.237 release
This commit is contained in:
parent
5ab93130eb
commit
e778bb9a8c
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@ license:CC0
|
|||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<!-- Doesn't boot -->
|
<!-- Doesn't boot -->
|
||||||
<software name="crowman" supported="no">
|
<software name="crowman" supported="no">
|
||||||
<description>The Curse of Crowley Manor</description>
|
<description>The Curse of Crowley Manor</description>
|
||||||
@ -106,7 +106,7 @@ license:CC0
|
|||||||
</software>
|
</software>
|
||||||
|
|
||||||
<!-- Utilities -->
|
<!-- Utilities -->
|
||||||
|
|
||||||
<!-- TODO: how to actually draw? Missing key? -->
|
<!-- TODO: how to actually draw? Missing key? -->
|
||||||
<software name="micropai" supported="no">
|
<software name="micropai" supported="no">
|
||||||
<!-- Stylized with double hyphen in the middle on title screen -->
|
<!-- Stylized with double hyphen in the middle on title screen -->
|
||||||
|
12
makefile
12
makefile
@ -1809,18 +1809,18 @@ tests: $(REGTESTS)
|
|||||||
cleansrc:
|
cleansrc:
|
||||||
@echo Cleaning up tabs/spaces/end of lines....
|
@echo Cleaning up tabs/spaces/end of lines....
|
||||||
ifeq (posix,$(SHELLTYPE))
|
ifeq (posix,$(SHELLTYPE))
|
||||||
$(SILENT) find src \
|
$(SILENT) find src \( \
|
||||||
-name \*.c -o -name \*.cpp -o \
|
-name \*.c -o -name \*.cpp -o \
|
||||||
-name \*.h -o -name \*.hpp -o -name \*.hxx -o \
|
-name \*.h -o -name \*.hpp -o -name \*.hxx -o \
|
||||||
-name \*.ipp -o \
|
-name \*.ipp -o \
|
||||||
-name \*.mm -o \
|
-name \*.mm -o \
|
||||||
-name \*.lay -o \
|
-name \*.lay -o \
|
||||||
-name \*.lst \
|
-name \*.lst \
|
||||||
-exec ./srcclean {} \; >&2
|
\) -exec ./srcclean {} \; >&2
|
||||||
$(SILENT) find hash -name \*.hsi -o -name \*.xml -exec ./srcclean {} \; >&2
|
$(SILENT) find hash \( -name \*.hsi -o -name \*.xml \) -exec ./srcclean {} \; >&2
|
||||||
$(SILENT) find bgfx -name \*.json -exec ./srcclean {} \; >&2
|
$(SILENT) find bgfx \( -name \*.json \) -exec ./srcclean {} \; >&2
|
||||||
$(SILENT) find plugins -name \*.lua -o -name \*.json -exec ./srcclean {} \; >&2
|
$(SILENT) find plugins \( -name \*.lua -o -name \*.json \) -exec ./srcclean {} \; >&2
|
||||||
$(SILENT) find scripts -name \*.lua -exec ./srcclean {} \; >&2
|
$(SILENT) find scripts \( -name \*.lua \) -exec ./srcclean {} \; >&2
|
||||||
else
|
else
|
||||||
$(shell for /r src %%i in (*.c, *.cpp, *.h, *.hpp, *.hxx, *.ipp, *.mm, *.lay, *.lst) do srcclean %%i >&2 )
|
$(shell for /r src %%i in (*.c, *.cpp, *.h, *.hpp, *.hxx, *.ipp, *.mm, *.lay, *.lst) do srcclean %%i >&2 )
|
||||||
$(shell for /r hash %%i in (*.hsi, *.xml) do srcclean %%i >&2 )
|
$(shell for /r hash %%i in (*.hsi, *.xml) do srcclean %%i >&2 )
|
||||||
|
@ -1758,7 +1758,7 @@ void nes_bmc_970630c_device::write_h(offs_t offset, u8 data)
|
|||||||
|
|
||||||
u8 nes_bmc_970630c_device::read_h(offs_t offset)
|
u8 nes_bmc_970630c_device::read_h(offs_t offset)
|
||||||
{
|
{
|
||||||
// LOG_MMC(("bmc_970630c read_h, offset: %04x\n", offset));
|
// LOG_MMC(("bmc_970630c read_h, offset: %04x\n", offset));
|
||||||
|
|
||||||
if (m_latch)
|
if (m_latch)
|
||||||
return 0; // TODO: menu supposedly varies by solder pad value returned here, but it doesn't seem to work...
|
return 0; // TODO: menu supposedly varies by solder pad value returned here, but it doesn't seem to work...
|
||||||
|
@ -556,7 +556,7 @@ void nes_sachen_3014_device::write_h(offs_t offset, u8 data)
|
|||||||
|
|
||||||
u8 nes_sachen_3014_device::read_h(offs_t offset)
|
u8 nes_sachen_3014_device::read_h(offs_t offset)
|
||||||
{
|
{
|
||||||
// LOG_MMC(("Sachen 3014 read_h, offset: %04x\n", offset));
|
// LOG_MMC(("Sachen 3014 read_h, offset: %04x\n", offset));
|
||||||
u8 temp = hi_access_rom(offset);
|
u8 temp = hi_access_rom(offset);
|
||||||
|
|
||||||
if ((offset & 0x7000) == 0x6000)
|
if ((offset & 0x7000) == 0x6000)
|
||||||
|
@ -399,7 +399,7 @@ void nes_cityfight_device::write_h(offs_t offset, u8 data)
|
|||||||
|
|
||||||
u8 nes_shuiguan_device::read_m(offs_t offset)
|
u8 nes_shuiguan_device::read_m(offs_t offset)
|
||||||
{
|
{
|
||||||
// LOG_MMC(("shuiguan read_m, offset: %04x\n", offset));
|
// LOG_MMC(("shuiguan read_m, offset: %04x\n", offset));
|
||||||
return m_prg[(m_reg * 0x2000 + offset) & (m_prg_size - 1)];
|
return m_prg[(m_reg * 0x2000 + offset) & (m_prg_size - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Devin Acker
|
// copyright-holders:Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913
|
Casio GT913
|
||||||
|
|
||||||
This chip powers several late-90s/early-2000s Casio keyboards.
|
This chip powers several late-90s/early-2000s Casio keyboards.
|
||||||
It's based on the H8/300 instruction set, but with different encoding
|
It's based on the H8/300 instruction set, but with different encoding
|
||||||
for many opcodes, as well as:
|
for many opcodes, as well as:
|
||||||
|
|
||||||
- Dedicated bank switching instructions (20-bit external address bus)
|
- Dedicated bank switching instructions (20-bit external address bus)
|
||||||
- Two timers, three 8-bit ports, two 8-bit ADCs
|
- Two timers, three 8-bit ports, two 8-bit ADCs
|
||||||
- Keyboard controller w/ key velocity detection
|
- Keyboard controller w/ key velocity detection
|
||||||
- MIDI UART
|
- MIDI UART
|
||||||
- 24-voice PCM sound (currently not emulated / fully understood)
|
- 24-voice PCM sound (currently not emulated / fully understood)
|
||||||
|
|
||||||
Earlier and later Casio keyboard models contain "uPD912" and "uPD914" chips,
|
Earlier and later Casio keyboard models contain "uPD912" and "uPD914" chips,
|
||||||
which are presumably similar.
|
which are presumably similar.
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ std::unique_ptr<util::disasm_interface> gt913_device::create_disassembler()
|
|||||||
|
|
||||||
void gt913_device::map(address_map &map)
|
void gt913_device::map(address_map &map)
|
||||||
{
|
{
|
||||||
// map.unmap_value_high();
|
// map.unmap_value_high();
|
||||||
|
|
||||||
map(0x0000, 0x7fff).rom();
|
map(0x0000, 0x7fff).rom();
|
||||||
map(0x8000, 0xbfff).bankr("bank");
|
map(0x8000, 0xbfff).bankr("bank");
|
||||||
@ -80,7 +80,7 @@ void gt913_device::map(address_map &map)
|
|||||||
map(0xfff1, 0xfff1).rw(m_port[1], FUNC(h8_port_device::ddr_r), FUNC(h8_port_device::ddr_w));
|
map(0xfff1, 0xfff1).rw(m_port[1], FUNC(h8_port_device::ddr_r), FUNC(h8_port_device::ddr_w));
|
||||||
map(0xfff2, 0xfff2).rw(m_port[0], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
map(0xfff2, 0xfff2).rw(m_port[0], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
||||||
map(0xfff3, 0xfff3).rw(m_port[1], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
map(0xfff3, 0xfff3).rw(m_port[1], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
||||||
// map(0xfff4, 0xfff4).nopw(); probably not port 3 DDR - ctk551 writes 0x00 but uses port 3 for output only
|
// map(0xfff4, 0xfff4).nopw(); probably not port 3 DDR - ctk551 writes 0x00 but uses port 3 for output only
|
||||||
map(0xfff5, 0xfff5).rw(m_port[2], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
map(0xfff5, 0xfff5).rw(m_port[2], FUNC(h8_port_device::port_r), FUNC(h8_port_device::dr_w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ protected:
|
|||||||
virtual void internal_update(uint64_t current_time) override;
|
virtual void internal_update(uint64_t current_time) override;
|
||||||
virtual void irq_setup() override;
|
virtual void irq_setup() override;
|
||||||
virtual void execute_set_input(int inputnum, int state) override;
|
virtual void execute_set_input(int inputnum, int state) override;
|
||||||
|
|
||||||
virtual void device_add_mconfig(machine_config &config) override;
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
void map(address_map &map);
|
void map(address_map &map);
|
||||||
|
|
||||||
@ -58,12 +58,12 @@ protected:
|
|||||||
|
|
||||||
required_memory_bank m_bank;
|
required_memory_bank m_bank;
|
||||||
uint16_t m_banknum;
|
uint16_t m_banknum;
|
||||||
|
|
||||||
required_device<gt913_intc_device> m_intc;
|
required_device<gt913_intc_device> m_intc;
|
||||||
|
|
||||||
/* sound */
|
/* sound */
|
||||||
required_device<gt913_sound_hle_device> m_sound;
|
required_device<gt913_sound_hle_device> m_sound;
|
||||||
|
|
||||||
/* key controller */
|
/* key controller */
|
||||||
required_device<gt913_kbd_hle_device> m_kbd;
|
required_device<gt913_kbd_hle_device> m_kbd;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ protected:
|
|||||||
|
|
||||||
/* serial port */
|
/* serial port */
|
||||||
required_device<h8_sci_device> m_sci;
|
required_device<h8_sci_device> m_sci;
|
||||||
|
|
||||||
/* 3x 8-bit I/O ports */
|
/* 3x 8-bit I/O ports */
|
||||||
required_device_array<h8_port_device, 3> m_port;
|
required_device_array<h8_port_device, 3> m_port;
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ std::string tms32082_pp_disassembler::get_reg_name(int reg, bool read)
|
|||||||
|
|
||||||
case 0x07:
|
case 0x07:
|
||||||
case 0x0f:
|
case 0x0f:
|
||||||
return util::string_format("0"); // a7 and a15 read as zero
|
return util::string_format("0"); // a7 and a15 read as zero
|
||||||
|
|
||||||
case 0x06:
|
case 0x06:
|
||||||
case 0x0e:
|
case 0x0e:
|
||||||
@ -136,16 +136,16 @@ std::string tms32082_pp_disassembler::make_mem_transfer(int mode, int dst, int a
|
|||||||
|
|
||||||
switch (le)
|
switch (le)
|
||||||
{
|
{
|
||||||
case 0: // store
|
case 0: // store
|
||||||
transfer_text = util::string_format("&%s*(%s) = %s", TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x), get_reg_name(dst, true));
|
transfer_text = util::string_format("&%s*(%s) = %s", TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x), get_reg_name(dst, true));
|
||||||
break;
|
break;
|
||||||
case 1: // address unit arithmetic
|
case 1: // address unit arithmetic
|
||||||
transfer_text = util::string_format("%s = %s", get_reg_name(dst, false), make_ea(mode, a, scale, size, imm, x));
|
transfer_text = util::string_format("%s = %s", get_reg_name(dst, false), make_ea(mode, a, scale, size, imm, x));
|
||||||
break;
|
break;
|
||||||
case 2: // zero-extended load
|
case 2: // zero-extended load
|
||||||
transfer_text = util::string_format("%s = &%s*(%s)", get_reg_name(dst, false), TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x));
|
transfer_text = util::string_format("%s = &%s*(%s)", get_reg_name(dst, false), TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x));
|
||||||
break;
|
break;
|
||||||
case 3: // sign-extended load
|
case 3: // sign-extended load
|
||||||
transfer_text = util::string_format("%s = &s%s*(%s)", get_reg_name(dst, false), TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x));
|
transfer_text = util::string_format("%s = &s%s*(%s)", get_reg_name(dst, false), TRANSFER_SIZE[size], make_ea(mode, a, scale, size, imm, x));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -218,13 +218,13 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
int gbits = (op >> 15) & 3;
|
int gbits = (op >> 15) & 3;
|
||||||
|
|
||||||
if (lbits == 0 && gbits == 0)
|
if (lbits == 0 && gbits == 0)
|
||||||
{
|
{
|
||||||
switch ((op >> 13) & 3)
|
switch ((op >> 13) & 3)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
// 7. Conditional DU||Conditional Move
|
// 7. Conditional DU||Conditional Move
|
||||||
int cond = (op >> 32) & 0xf;
|
int cond = (op >> 32) & 0xf;
|
||||||
int ncvz = (op >> 25) & 0xf;
|
int ncvz = (op >> 25) & 0xf;
|
||||||
|
|
||||||
m_alu_condition = make_condition(cond, ncvz);
|
m_alu_condition = make_condition(cond, ncvz);
|
||||||
@ -258,7 +258,7 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
int dst = ((op >> 3) & 7) | (m_dstbank << 3);
|
int dst = ((op >> 3) & 7) | (m_dstbank << 3);
|
||||||
int src = ((op >> 10) & 7) | (4 << 3);
|
int src = ((op >> 10) & 7) | (4 << 3);
|
||||||
|
|
||||||
int cond = (op >> 32) & 0xf;
|
int cond = (op >> 32) & 0xf;
|
||||||
int ncvz = (op >> 25) & 0xf;
|
int ncvz = (op >> 25) & 0xf;
|
||||||
|
|
||||||
bool r = (op & (1 << 29)) ? true : false;
|
bool r = (op & (1 << 29)) ? true : false;
|
||||||
@ -275,14 +275,14 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
// 10. Conditional Non-D Data Unit
|
// 10. Conditional Non-D Data Unit
|
||||||
|
|
||||||
// no transfer, only modifies ALU operation
|
// no transfer, only modifies ALU operation
|
||||||
m_src1bank = (op >> 6) & 0xf;
|
m_src1bank = (op >> 6) & 0xf;
|
||||||
m_dstbank = (op >> 18) & 0xf;
|
m_dstbank = (op >> 18) & 0xf;
|
||||||
|
|
||||||
int cond = (op >> 32) & 0xf;
|
int cond = (op >> 32) & 0xf;
|
||||||
// bool c = (op & (1 << 31)) ? true : false;
|
// bool c = (op & (1 << 31)) ? true : false;
|
||||||
// bool r = (op & (1 << 30)) ? true : false;
|
// bool r = (op & (1 << 30)) ? true : false;
|
||||||
int ncvz = (op >> 25) & 0xf;
|
int ncvz = (op >> 25) & 0xf;
|
||||||
|
|
||||||
m_alu_condition = make_condition(cond, ncvz);
|
m_alu_condition = make_condition(cond, ncvz);
|
||||||
@ -292,20 +292,20 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (lbits == 0 && gbits != 0)
|
else if (lbits == 0 && gbits != 0)
|
||||||
{
|
{
|
||||||
if (op & 0x4)
|
if (op & 0x4)
|
||||||
{
|
{
|
||||||
// 9. Conditional DU||Conditional Global
|
// 9. Conditional DU||Conditional Global
|
||||||
int global_im = (op >> 22) & 7;
|
int global_im = (op >> 22) & 7;
|
||||||
int global_x = ((op >> 22) & 7) | 8; // global x-registers: x8-x10
|
int global_x = ((op >> 22) & 7) | 8; // global x-registers: x8-x10
|
||||||
int bank = (op >> 18) & 7;
|
int bank = (op >> 18) & 7;
|
||||||
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
||||||
int gmode = (op >> 13) & 0xf;
|
int gmode = (op >> 13) & 0xf;
|
||||||
int reg = (op >> 10) & 7;
|
int reg = (op >> 10) & 7;
|
||||||
int global_size = (op >> 7) & 3;
|
int global_size = (op >> 7) & 3;
|
||||||
bool global_s = (op & (1 << 6)) ? true : false;
|
bool global_s = (op & (1 << 6)) ? true : false;
|
||||||
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
||||||
int cond = (op >> 32) & 0xf;
|
int cond = (op >> 32) & 0xf;
|
||||||
int ncvz = (op >> 25) & 0xf;
|
int ncvz = (op >> 25) & 0xf;
|
||||||
|
|
||||||
m_alu_condition = make_condition(cond, ncvz);
|
m_alu_condition = make_condition(cond, ncvz);
|
||||||
@ -319,17 +319,17 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 5. Global(Long Offset)
|
// 5. Global(Long Offset)
|
||||||
int bank = (op >> 18) & 0xf;
|
int bank = (op >> 18) & 0xf;
|
||||||
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
||||||
int gmode = (op >> 13) & 0xf;
|
int gmode = (op >> 13) & 0xf;
|
||||||
int reg = (op >> 10) & 7;
|
int reg = (op >> 10) & 7;
|
||||||
int global_size = (op >> 7) & 3;
|
int global_size = (op >> 7) & 3;
|
||||||
bool global_s = (op & (1 << 6)) ? true : false;
|
bool global_s = (op & (1 << 6)) ? true : false;
|
||||||
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
||||||
|
|
||||||
int offset = (op >> 22) & 0x7fff;
|
int offset = (op >> 22) & 0x7fff;
|
||||||
int x = (offset & 7) | 8; // global x-registers: x8-x10
|
int x = (offset & 7) | 8; // global x-registers: x8-x10
|
||||||
|
|
||||||
// s-bit is MSB for immediate value when transfer size is 8 bits
|
// s-bit is MSB for immediate value when transfer size is 8 bits
|
||||||
if (global_size == 0)
|
if (global_size == 0)
|
||||||
@ -346,7 +346,7 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
{
|
{
|
||||||
// 2. Move||Local
|
// 2. Move||Local
|
||||||
int lmode = (op >> 35) & 0xf;
|
int lmode = (op >> 35) & 0xf;
|
||||||
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
||||||
int local_le = ((op >> 31) & 1) | ((op >> 16) & 2);
|
int local_le = ((op >> 31) & 1) | ((op >> 16) & 2);
|
||||||
int local_size = (op >> 29) & 3;
|
int local_size = (op >> 29) & 3;
|
||||||
bool local_s = (op & (1 << 28)) ? true : false;
|
bool local_s = (op & (1 << 28)) ? true : false;
|
||||||
@ -381,7 +381,7 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
{
|
{
|
||||||
// 6. Non-D DU||Local
|
// 6. Non-D DU||Local
|
||||||
int lmode = (op >> 35) & 0xf;
|
int lmode = (op >> 35) & 0xf;
|
||||||
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
||||||
int le = ((op >> 31) & 1) | ((op >> 16) & 2);
|
int le = ((op >> 31) & 1) | ((op >> 16) & 2);
|
||||||
int size = (op >> 29) & 3;
|
int size = (op >> 29) & 3;
|
||||||
bool s = (op & (1 << 28)) ? true : false;
|
bool s = (op & (1 << 28)) ? true : false;
|
||||||
@ -425,20 +425,20 @@ void tms32082_pp_disassembler::parallel_transfer(uint64_t op)
|
|||||||
// (gbits != 0 && lbits != 0)
|
// (gbits != 0 && lbits != 0)
|
||||||
// 1. Double Parallel
|
// 1. Double Parallel
|
||||||
int lmode = (op >> 35) & 0xf;
|
int lmode = (op >> 35) & 0xf;
|
||||||
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
int d = ((op >> 32) & 7) | (0x4 << 3); // d-registers are in bank 4
|
||||||
int local_le = ((op >> 31) & 1) | ((op >> 20) & 2);
|
int local_le = ((op >> 31) & 1) | ((op >> 20) & 2);
|
||||||
int local_size = (op >> 29) & 3;
|
int local_size = (op >> 29) & 3;
|
||||||
bool local_s = (op & (1 << 28)) ? true : false;
|
bool local_s = (op & (1 << 28)) ? true : false;
|
||||||
int local_a = (op >> 25) & 7;
|
int local_a = (op >> 25) & 7;
|
||||||
int global_im = (op >> 22) & 7;
|
int global_im = (op >> 22) & 7;
|
||||||
int global_x = ((op >> 22) & 7) | 8; // global x-registers: x8-x10
|
int global_x = ((op >> 22) & 7) | 8; // global x-registers: x8-x10
|
||||||
int bank = (op >> 18) & 7;
|
int bank = (op >> 18) & 7;
|
||||||
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
int global_le = ((op >> 9) & 1) | ((op >> 16) & 2);
|
||||||
int gmode = (op >> 13) & 0xf;
|
int gmode = (op >> 13) & 0xf;
|
||||||
int reg = (op >> 10) & 7;
|
int reg = (op >> 10) & 7;
|
||||||
int global_size = (op >> 7) & 3;
|
int global_size = (op >> 7) & 3;
|
||||||
bool global_s = (op & (1 << 6)) ? true : false;
|
bool global_s = (op & (1 << 6)) ? true : false;
|
||||||
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
int global_a = ((op >> 3) & 7) | 8; // global a-registers: a8-a12
|
||||||
int local_im = op & 7;
|
int local_im = op & 7;
|
||||||
int local_x = op & 7;
|
int local_x = op & 7;
|
||||||
|
|
||||||
@ -462,12 +462,12 @@ std::string tms32082_pp_disassembler::format_alu_op(int aluop, int a, const std:
|
|||||||
|
|
||||||
switch (modifier)
|
switch (modifier)
|
||||||
{
|
{
|
||||||
case 0: break; // normal operation
|
case 0: break; // normal operation
|
||||||
case 1: break; // cin (TODO)
|
case 1: break; // cin (TODO)
|
||||||
case 4: a_text = util::string_format("0"); break; // A port = 0
|
case 4: a_text = util::string_format("0"); break; // A port = 0
|
||||||
case 5: a_text = util::string_format("0"); break; // A port = 0, cin (TODO)
|
case 5: a_text = util::string_format("0"); break; // A port = 0, cin (TODO)
|
||||||
case 6: a_text = util::string_format("0"); break; // A port = 0 and %! if maskgen instruction. lmbc if not maskgen instruction. (TODO)
|
case 6: a_text = util::string_format("0"); break; // A port = 0 and %! if maskgen instruction. lmbc if not maskgen instruction. (TODO)
|
||||||
case 7: a_text = util::string_format("0"); break; // A port = 0, %!, and cin if maskgen instruction. rmbc if not maskgen instruction. (TODO)
|
case 7: a_text = util::string_format("0"); break; // A port = 0, %!, and cin if maskgen instruction. rmbc if not maskgen instruction. (TODO)
|
||||||
}
|
}
|
||||||
|
|
||||||
int bits = (aluop & 1) | ((aluop >> 1) & 2) | ((aluop >> 2) & 4) | ((aluop >> 3) & 8);
|
int bits = (aluop & 1) | ((aluop >> 1) & 2) | ((aluop >> 2) & 4) | ((aluop >> 3) & 8);
|
||||||
@ -535,14 +535,14 @@ std::string tms32082_pp_disassembler::format_alu_op(int aluop, int a, const std:
|
|||||||
case 0x44: // ~A & B & C | ~A & B & ~C = ~A & B
|
case 0x44: // ~A & B & C | ~A & B & ~C = ~A & B
|
||||||
return util::string_format("%s = ~%s & %s", dst_text, a_text, b_text);
|
return util::string_format("%s = ~%s & %s", dst_text, a_text, b_text);
|
||||||
|
|
||||||
case 0x22: // A & ~B & ~C | A & ~B & C = A & ~B
|
case 0x22: // A & ~B & ~C | A & ~B & C = A & ~B
|
||||||
return util::string_format("%s = %s & ~%s", dst_text, a_text, b_text);
|
return util::string_format("%s = %s & ~%s", dst_text, a_text, b_text);
|
||||||
|
|
||||||
case 0xaf: // A & B & C | A & ~B & C | A & B & ~C |
|
case 0xaf: // A & B & C | A & ~B & C | A & B & ~C |
|
||||||
// ~A & B & ~C | A & ~B & ~C | ~A & ~B & ~C = A | ~C
|
// ~A & B & ~C | A & ~B & ~C | ~A & ~B & ~C = A | ~C
|
||||||
return util::string_format("%s = %s | ~%s", dst_text, a_text, c_text);
|
return util::string_format("%s = %s | ~%s", dst_text, a_text, c_text);
|
||||||
|
|
||||||
case 0xfa: // A & B & C | ~A & B & C | A & ~B & C |
|
case 0xfa: // A & B & C | ~A & B & C | A & ~B & C |
|
||||||
// ~A & ~B & C | A & B & ~C | A & ~B & ~C = A | C
|
// ~A & ~B & C | A & B & ~C | A & ~B & ~C = A | C
|
||||||
return util::string_format("%s = %s | %s", dst_text, a_text, c_text);
|
return util::string_format("%s = %s | %s", dst_text, a_text, c_text);
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ offs_t tms32082_pp_disassembler::disassemble(std::ostream &stream, offs_t pc, co
|
|||||||
if ((op & 0xfaa8100000000000U) == 0x8800000000000000U)
|
if ((op & 0xfaa8100000000000U) == 0x8800000000000000U)
|
||||||
{
|
{
|
||||||
int operation = (op >> 39) & 0x1f;
|
int operation = (op >> 39) & 0x1f;
|
||||||
|
|
||||||
parallel_transfer(op);
|
parallel_transfer(op);
|
||||||
|
|
||||||
switch (operation)
|
switch (operation)
|
||||||
@ -669,7 +669,7 @@ offs_t tms32082_pp_disassembler::disassemble(std::ostream &stream, offs_t pc, co
|
|||||||
case 0:
|
case 0:
|
||||||
case 1: // Base set ALU (5-bit immediate)
|
case 1: // Base set ALU (5-bit immediate)
|
||||||
{
|
{
|
||||||
parallel_transfer(op);
|
parallel_transfer(op);
|
||||||
|
|
||||||
int dst = (op >> 48) & 7;
|
int dst = (op >> 48) & 7;
|
||||||
int src1 = (op >> 45) & 7;
|
int src1 = (op >> 45) & 7;
|
||||||
@ -728,7 +728,7 @@ offs_t tms32082_pp_disassembler::disassemble(std::ostream &stream, offs_t pc, co
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_alu_operation = format_alu_op(aluop, a, dst_text, a_text, b_text, c_text);
|
m_alu_operation = format_alu_op(aluop, a, dst_text, a_text, b_text, c_text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -793,7 +793,7 @@ offs_t tms32082_pp_disassembler::disassemble(std::ostream &stream, offs_t pc, co
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_alu_operation = format_alu_op(aluop, a, dst_text, a_text, b_text, c_text);
|
m_alu_operation = format_alu_op(aluop, a, dst_text, a_text, b_text, c_text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ offs_t tms32082_pp_disassembler::disassemble(std::ostream &stream, offs_t pc, co
|
|||||||
{
|
{
|
||||||
stream << " || ";
|
stream << " || ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_parallel_transfer.length() > 0)
|
if (m_parallel_transfer.length() > 0)
|
||||||
{
|
{
|
||||||
stream << m_parallel_condition;
|
stream << m_parallel_condition;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Devin Acker
|
// copyright-holders:Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 I/O (HLE)
|
Casio GT913 I/O (HLE)
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- timer behavior is unverified (see comment in timer_control_w and timer_adjust)
|
- timer behavior is unverified (see comment in timer_control_w and timer_adjust)
|
||||||
- various other unemulated registers
|
- various other unemulated registers
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders: Devin Acker
|
// copyright-holders: Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 I/O (HLE)
|
Casio GT913 I/O (HLE)
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef MAME_MACHINE_GT913_IO_H
|
#ifndef MAME_MACHINE_GT913_IO_H
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Devin Acker
|
// copyright-holders:Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 keyboard controller (HLE)
|
Casio GT913 keyboard controller (HLE)
|
||||||
|
|
||||||
This is the keyboard controller portion of the GT913.
|
This is the keyboard controller portion of the GT913.
|
||||||
The actual keyboard keys (as opposed to console buttons) have two
|
The actual keyboard keys (as opposed to console buttons) have two
|
||||||
contacts per key, which allows the controller to detect the velocity
|
contacts per key, which allows the controller to detect the velocity
|
||||||
of the keypress. The detected velocity is read as a 7-bit value
|
of the keypress. The detected velocity is read as a 7-bit value
|
||||||
from the data port, along with the actual key scan code.
|
from the data port, along with the actual key scan code.
|
||||||
|
|
||||||
Right now, velocity is just simulated using an (optional) analog
|
Right now, velocity is just simulated using an (optional) analog
|
||||||
control. The keyboard FIFO size is also basically a guess based on
|
control. The keyboard FIFO size is also basically a guess based on
|
||||||
the CTK-551's 16-key polyphony.
|
the CTK-551's 16-key polyphony.
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ gt913_kbd_hle_device::gt913_kbd_hle_device(const machine_config &mconfig, const
|
|||||||
void gt913_kbd_hle_device::device_start()
|
void gt913_kbd_hle_device::device_start()
|
||||||
{
|
{
|
||||||
m_intc = siblingdevice<h8_intc_device>(m_intc_tag);
|
m_intc = siblingdevice<h8_intc_device>(m_intc_tag);
|
||||||
|
|
||||||
save_item(NAME(m_status));
|
save_item(NAME(m_status));
|
||||||
save_item(NAME(m_fifo));
|
save_item(NAME(m_fifo));
|
||||||
save_item(NAME(m_fifo_read));
|
save_item(NAME(m_fifo_read));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders: Devin Acker
|
// copyright-holders: Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 keyboard controller (HLE)
|
Casio GT913 keyboard controller (HLE)
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef MAME_MACHINE_GT913_KBD_H
|
#ifndef MAME_MACHINE_GT913_KBD_H
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Devin Acker
|
// copyright-holders:Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 sound (HLE)
|
Casio GT913 sound (HLE)
|
||||||
|
|
||||||
This is the sound portion of the GT913.
|
This is the sound portion of the GT913.
|
||||||
Up to 24 voices can be mixed into a 16-bit stereo serial bitstream,
|
Up to 24 voices can be mixed into a 16-bit stereo serial bitstream,
|
||||||
which is then input to either a serial DAC or a HG51B-based DSP,
|
which is then input to either a serial DAC or a HG51B-based DSP,
|
||||||
depending on the model of keyboard.
|
depending on the model of keyboard.
|
||||||
|
|
||||||
Currently, the actual sample format in ROM is unknown.
|
Currently, the actual sample format in ROM is unknown.
|
||||||
The serial output is twos-complement 16-bit PCM, but the data in ROM
|
The serial output is twos-complement 16-bit PCM, but the data in ROM
|
||||||
doesn't seem to be - reading it as such produces sounds that are
|
doesn't seem to be - reading it as such produces sounds that are
|
||||||
somewhat recognizable, but highly distorted.
|
somewhat recognizable, but highly distorted.
|
||||||
|
|
||||||
For now, all known (and unknown) register writes are just logged
|
For now, all known (and unknown) register writes are just logged
|
||||||
without generating any sound.
|
without generating any sound.
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders: Devin Acker
|
// copyright-holders: Devin Acker
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
Casio GT913 sound (HLE)
|
Casio GT913 sound (HLE)
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef MAME_AUDIO_GT913_H
|
#ifndef MAME_AUDIO_GT913_H
|
||||||
@ -30,7 +30,7 @@ protected:
|
|||||||
// device_t overrides
|
// device_t overrides
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t m_gain;
|
uint8_t m_gain;
|
||||||
uint16_t m_data[3];
|
uint16_t m_data[3];
|
||||||
|
@ -903,7 +903,7 @@ uint8_t mos6526_device::read(offs_t offset)
|
|||||||
data = (m_ir1 << 7) | m_icr;
|
data = (m_ir1 << 7) | m_icr;
|
||||||
|
|
||||||
// Do not reset irqs unless one is effectively issued.
|
// Do not reset irqs unless one is effectively issued.
|
||||||
// cfr. amigaocs_flop.xml barb2paln4 that polls for Timer B status
|
// cfr. amigaocs_flop.xml barb2paln4 that polls for Timer B status
|
||||||
// until it expires at PC=7821c and other places.
|
// until it expires at PC=7821c and other places.
|
||||||
if (machine().side_effects_disabled() || !m_icr)
|
if (machine().side_effects_disabled() || !m_icr)
|
||||||
return data;
|
return data;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
Seta custom ST-0016 chip
|
Seta custom ST-0016 chip
|
||||||
sound emulation by R. Belmont, Tomasz Slanina, and David Haywood
|
sound emulation by R. Belmont, Tomasz Slanina, and David Haywood
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Verify keyon/off flag behavior
|
- Verify keyon/off flag behavior
|
||||||
************************************/
|
************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -238,12 +238,12 @@ void st0016_device::voice_t::reg_w(offs_t offset, u8 data, int voice)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
LOG("Key on V%02d: st %06x-%06x lp %06x-%06x frq %x flg %x\n", voice,
|
LOG("Key on V%02d: st %06x-%06x lp %06x-%06x frq %x flg %x\n", voice,
|
||||||
m_start,
|
m_start,
|
||||||
m_end,
|
m_end,
|
||||||
m_lpstart,
|
m_lpstart,
|
||||||
m_lpend,
|
m_lpend,
|
||||||
m_freq,
|
m_freq,
|
||||||
m_regs[0x16]);
|
m_regs[0x16]);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1072,7 +1072,7 @@ int debugger_commands::mini_printf(char *buffer, const char *format, int params,
|
|||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
execute_index_command - helper for commands
|
execute_index_command - helper for commands
|
||||||
that take multiple indices as arguments
|
that take multiple indices as arguments
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -152,7 +152,7 @@ private:
|
|||||||
std::string m_publisher;
|
std::string m_publisher;
|
||||||
std::list<software_info_item> m_info; // Here we store info like developer, serial #, etc. which belong to the software entry as a whole
|
std::list<software_info_item> m_info; // Here we store info like developer, serial #, etc. which belong to the software entry as a whole
|
||||||
software_info_item::set m_shared_features; // Here we store info like TV standard compatibility, or add-on requirements, etc. which get inherited
|
software_info_item::set m_shared_features; // Here we store info like TV standard compatibility, or add-on requirements, etc. which get inherited
|
||||||
// by each part of this software entry (after loading these are stored in partdata->features)
|
// by each part of this software entry (after loading these are stored in partdata->features)
|
||||||
std::list<software_part> m_partdata;
|
std::list<software_part> m_partdata;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ public:
|
|||||||
bool done() const { return m_done; }
|
bool done() const { return m_done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::function<bool(const char *shortname, bool &done)> & m_callback;
|
const std::function<bool(const char *shortname, bool &done)> & m_callback;
|
||||||
bool m_done;
|
bool m_done;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -91,9 +91,9 @@ public:
|
|||||||
bool done() const { return m_done || m_devfilter.done(); }
|
bool done() const { return m_done || m_devfilter.done(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
driver_enumerator & m_drivlist;
|
driver_enumerator & m_drivlist;
|
||||||
device_filter & m_devfilter;
|
device_filter & m_devfilter;
|
||||||
bool m_done;
|
bool m_done;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -592,8 +592,8 @@ std::string normalize_string(const char *string)
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_filter::filter - apply the filter, if
|
// device_filter::filter - apply the filter, if
|
||||||
// present
|
// present
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
bool device_filter::filter(const char *shortname)
|
bool device_filter::filter(const char *shortname)
|
||||||
@ -604,7 +604,7 @@ bool device_filter::filter(const char *shortname)
|
|||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// filtered_driver_enumerator::next - take a number
|
// filtered_driver_enumerator::next - take a number
|
||||||
// of game_drivers, while applying filters
|
// of game_drivers, while applying filters
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
std::vector<std::reference_wrapper<const game_driver>> filtered_driver_enumerator::next(int count)
|
std::vector<std::reference_wrapper<const game_driver>> filtered_driver_enumerator::next(int count)
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
Amiga 500 + Sony laserdisc player LDP-1450
|
Amiga 500 + Sony laserdisc player LDP-1450
|
||||||
(LDP-3300P for Zorton Brothers, LDP-1500 for Marbella Vice)
|
(LDP-3300P for Zorton Brothers, LDP-1500 for Marbella Vice)
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Implement LD comms (thru Amiga SERDAT / SERDATR ports);
|
- Implement LD comms (thru Amiga SERDAT / SERDATR ports);
|
||||||
- Why it enables FDC DMA like at all?
|
- Why it enables FDC DMA like at all?
|
||||||
Is the board really capable of reading floppies for some reason?
|
Is the board really capable of reading floppies for some reason?
|
||||||
- Picmatic games may really belong to a different driver,
|
- Picmatic games may really belong to a different driver,
|
||||||
just sharing the Amiga base state;
|
just sharing the Amiga base state;
|
||||||
|
|
||||||
Games Supported:
|
Games Supported:
|
||||||
|
|
||||||
|
@ -1104,9 +1104,9 @@ ROM_START( cosmica23 ) // Main: 7910-AII, sub: 7910-BII, no sound sub PCB
|
|||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
/* This set appears to be an intermediate version between the 'II' (cosmica) version and the early cosmica1 version; It still has the (C) 1979 titlescreen
|
/* This set appears to be an intermediate version between the 'II' (cosmica) version and the early cosmica1 version; It still has the (C) 1979 titlescreen
|
||||||
(which was removed on the II version since it may have came out in 1980?), and on all tms2708 eproms on a special rom daughterboard called "7910-V3";
|
(which was removed on the II version since it may have came out in 1980?), and on all tms2708 eproms on a special rom daughterboard called "7910-V3";
|
||||||
one possible reason is that 2708 eproms became cheaper than tms2516s for a time, so production was switched to them for a while between the early and II versions? */
|
one possible reason is that 2708 eproms became cheaper than tms2516s for a time, so production was switched to them for a while between the early and II versions? */
|
||||||
ROM_START( cosmica2a )
|
ROM_START( cosmica2a )
|
||||||
/* ROMs a-1 and b-2 match ii-1 from cosmica
|
/* ROMs a-1 and b-2 match ii-1 from cosmica
|
||||||
ROMs c-3 and d-4 are unique
|
ROMs c-3 and d-4 are unique
|
||||||
ROMs e-5 and f-6 match ii-3 from cosmica
|
ROMs e-5 and f-6 match ii-3 from cosmica
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Devin Acker
|
// copyright-holders:Devin Acker
|
||||||
/*
|
/*
|
||||||
Casio CTK-551 keyboard (and related models)
|
Casio CTK-551 keyboard (and related models)
|
||||||
|
|
||||||
Casio released several keyboard models with the same main board.
|
Casio released several keyboard models with the same main board.
|
||||||
As usual, some of them were also rebranded by Radio Shack.
|
As usual, some of them were also rebranded by Radio Shack.
|
||||||
|
|
||||||
- CTK-531, CTK-533
|
- CTK-531, CTK-533
|
||||||
Basic 61-key model
|
Basic 61-key model
|
||||||
- CTK-541, Optimus MD-1150
|
- CTK-541, Optimus MD-1150
|
||||||
Adds velocity-sensitive keys
|
Adds velocity-sensitive keys
|
||||||
- CTK-551, CTK-558, Radio Shack MD-1160
|
- CTK-551, CTK-558, Radio Shack MD-1160
|
||||||
Adds pitch wheel and different selection of demo songs
|
Adds pitch wheel and different selection of demo songs
|
||||||
|
|
||||||
Main board (JCM456-MA1M):
|
Main board (JCM456-MA1M):
|
||||||
|
|
||||||
LSI1: CPU (Casio GT913F)
|
LSI1: CPU (Casio GT913F)
|
||||||
Custom chip based on H8/300 instruction set, built in peripheral controllers & sound generator
|
Custom chip based on H8/300 instruction set, built in peripheral controllers & sound generator
|
||||||
|
|
||||||
LSI2: 8Mbit ROM (OKI MSM538002E)
|
LSI2: 8Mbit ROM (OKI MSM538002E)
|
||||||
|
|
||||||
LSI3: LCD controller (HD44780 compatible)
|
LSI3: LCD controller (HD44780 compatible)
|
||||||
May be either a Samsung KS0066U-10B or Epson SED1278F2A.
|
May be either a Samsung KS0066U-10B or Epson SED1278F2A.
|
||||||
|
|
||||||
IC1: stereo DAC (NEC uPD6379GR)
|
IC1: stereo DAC (NEC uPD6379GR)
|
||||||
|
|
||||||
CTK-541 service manual with schematics, pinouts, etc.:
|
CTK-541 service manual with schematics, pinouts, etc.:
|
||||||
https://revenant1.net/ctk541.pdf
|
https://revenant1.net/ctk541.pdf
|
||||||
|
|
||||||
To access the test mode (not mentioned in the service manual):
|
To access the test mode (not mentioned in the service manual):
|
||||||
Hold the "Start/Stop" and keypad 0 buttons together when turning on the keyboard.
|
Hold the "Start/Stop" and keypad 0 buttons together when turning on the keyboard.
|
||||||
Afterwards, press one of these buttons:
|
Afterwards, press one of these buttons:
|
||||||
- Tone: LCD test (press repeatedly)
|
- Tone: LCD test (press repeatedly)
|
||||||
- Keypad 0: switch test (press all front panel buttons in a specific order, generally left to right)
|
- Keypad 0: switch test (press all front panel buttons in a specific order, generally left to right)
|
||||||
- Keypad 1 or Rhythm: pedal and key test
|
- Keypad 1 or Rhythm: pedal and key test
|
||||||
- Keypad 2: ROM test
|
- Keypad 2: ROM test
|
||||||
- Keypad 4/5/6: sound volume test
|
- Keypad 4/5/6: sound volume test
|
||||||
- Keypad 7/8: stereo test
|
- Keypad 7/8: stereo test
|
||||||
- Keypad 9: MIDI loopback test
|
- Keypad 9: MIDI loopback test
|
||||||
- Keypad + or Song Bank: power source test
|
- Keypad + or Song Bank: power source test
|
||||||
- Keypad -: pitch wheel test
|
- Keypad -: pitch wheel test
|
||||||
- FFWD: exit test mode
|
- FFWD: exit test mode
|
||||||
- Stop: power off
|
- Stop: power off
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ INPUT_PORTS_START(ctk551)
|
|||||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Song Bank")
|
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Song Bank")
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Rhythm")
|
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Rhythm")
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Tone")
|
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Tone")
|
||||||
|
|
||||||
PORT_START("maincpu:kbd:KO9")
|
PORT_START("maincpu:kbd:KO9")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD)
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD)
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
|
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
|
||||||
|
@ -63,38 +63,38 @@
|
|||||||
|
|
||||||
ROM [0xc0050000] 0x10000 floats copied to [0x40180000]
|
ROM [0xc0050000] 0x10000 floats copied to [0x40180000]
|
||||||
|
|
||||||
ROM [0xff800000 - 0xff80171f] sound data headers, 32 bytes each
|
ROM [0xff800000 - 0xff80171f] sound data headers, 32 bytes each
|
||||||
Word 0: sound data pointer (offset from 0xff800000)
|
Word 0: sound data pointer (offset from 0xff800000)
|
||||||
Word 1: uncompressed length?
|
Word 1: uncompressed length?
|
||||||
Word 2: ?
|
Word 2: ?
|
||||||
Word 3: same as word 1?
|
Word 3: same as word 1?
|
||||||
Word 4: ?
|
Word 4: ?
|
||||||
Word 5: ?
|
Word 5: ?
|
||||||
Word 6: ?
|
Word 6: ?
|
||||||
Word 7: 0
|
Word 7: 0
|
||||||
|
|
||||||
ROM [0xff801720 -> ] compressed audio data
|
ROM [0xff801720 -> ] compressed audio data
|
||||||
|
|
||||||
[0x0000100c] bitmask of active sound channels (max 16 channels?)
|
[0x0000100c] bitmask of active sound channels (max 16 channels?)
|
||||||
[0x00001018 -> ] sound channel data, 64 bytes each
|
[0x00001018 -> ] sound channel data, 64 bytes each
|
||||||
+0x00: sound data pointer in ROM
|
+0x00: sound data pointer in ROM
|
||||||
+0x04: 0
|
+0x04: 0
|
||||||
+0x08: uncompressed length
|
+0x08: uncompressed length
|
||||||
+0x0c: uncompressed length
|
+0x0c: uncompressed length
|
||||||
+0x10: 0?
|
+0x10: 0?
|
||||||
+0x14: 0 - sample rate?
|
+0x14: 0 - sample rate?
|
||||||
+0x18: 0?
|
+0x18: 0?
|
||||||
+0x1c: sample rate? (halfword)
|
+0x1c: sample rate? (halfword)
|
||||||
+0x1e: ?? (halfword)
|
+0x1e: ?? (halfword)
|
||||||
+0x20: ?
|
+0x20: ?
|
||||||
+0x24: ?
|
+0x24: ?
|
||||||
+0x28: ?
|
+0x28: ?
|
||||||
+0x2c: ?
|
+0x2c: ?
|
||||||
+0x30: ?
|
+0x30: ?
|
||||||
+0x34: ?
|
+0x34: ?
|
||||||
+0x36: ? (halfword)
|
+0x36: ? (halfword)
|
||||||
+0x38: ?
|
+0x38: ?
|
||||||
+0x3c: ?
|
+0x3c: ?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ uint32_t rollext_state::a0000000_r(offs_t offset, uint32_t mem_mask)
|
|||||||
}
|
}
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
data |= 0x200; // 0 causes inf loop
|
data |= 0x200; // 0 causes inf loop
|
||||||
data |= m_eeprom_in->read() << 8;
|
data |= m_eeprom_in->read() << 8;
|
||||||
}
|
}
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
@ -686,7 +686,7 @@ static INPUT_PORTS_START(rollext)
|
|||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
|
||||||
|
|
||||||
PORT_START("EEPROMOUT")
|
PORT_START("EEPROMOUT")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ void st22xx_bbl338_state::porta_w(u8 data)
|
|||||||
|
|
||||||
void st22xx_bbl338_state::portb_w(u8 data)
|
void st22xx_bbl338_state::portb_w(u8 data)
|
||||||
{
|
{
|
||||||
// logerror("%s: port b write %02x\n", machine().describe_context(), data);
|
// logerror("%s: port b write %02x\n", machine().describe_context(), data);
|
||||||
m_portb = data;
|
m_portb = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,9 +761,9 @@ ROM_START(hotwheel)
|
|||||||
ROM_LOAD ( "htwhls_5.u5", 0x1000, 0x0400, CRC(e28f3c60) SHA1(eb780be60b41017d105288cef71906d15474b8fa))
|
ROM_LOAD ( "htwhls_5.u5", 0x1000, 0x0400, CRC(e28f3c60) SHA1(eb780be60b41017d105288cef71906d15474b8fa))
|
||||||
ROM_END
|
ROM_END
|
||||||
// Alternatives for rom3
|
// Alternatives for rom3
|
||||||
// ROM_LOAD( "hw04-3-425i.bin", 0x0800, 0x0400, CRC(ef0dcd76) SHA1(2250ecb883534df394466bdae96cef1ab7adf190) )
|
// ROM_LOAD( "hw04-3-425i.bin", 0x0800, 0x0400, CRC(ef0dcd76) SHA1(2250ecb883534df394466bdae96cef1ab7adf190) )
|
||||||
// ROM_LOAD( "hw04-3-429a.bin", 0x0800, 0x0400, CRC(997daff6) SHA1(c0889f1c48e72cdf4b10548442002b31499d4123) )
|
// ROM_LOAD( "hw04-3-429a.bin", 0x0800, 0x0400, CRC(997daff6) SHA1(c0889f1c48e72cdf4b10548442002b31499d4123) )
|
||||||
// ROM_LOAD( "hw04-3-5245.bin", 0x0800, 0x0400, CRC(2067112a) SHA1(8a6c21c6d0fff97b3577f0334d0f5e45a1f076c8) )
|
// ROM_LOAD( "hw04-3-5245.bin", 0x0800, 0x0400, CRC(2067112a) SHA1(8a6c21c6d0fff97b3577f0334d0f5e45a1f076c8) )
|
||||||
|
|
||||||
/*--------------------------------
|
/*--------------------------------
|
||||||
// House of Diamonds (07/78)
|
// House of Diamonds (07/78)
|
||||||
@ -793,9 +793,9 @@ ROM_START(locomotp)
|
|||||||
ROM_LOAD("loc-snd.fil", 0x0000, 0x0800, CRC(51ea9d2a) SHA1(9a68687af2c1cad2a261f61a67a625d906c502e1))
|
ROM_LOAD("loc-snd.fil", 0x0000, 0x0800, CRC(51ea9d2a) SHA1(9a68687af2c1cad2a261f61a67a625d906c502e1))
|
||||||
ROM_END
|
ROM_END
|
||||||
// Alternate dumps (not working)
|
// Alternate dumps (not working)
|
||||||
// ROM_LOAD( "loc-2.fil", 0x1c00, 0x0800, CRC(2ca902ac) SHA1(39d2728194933527f2aa4b2f5c2b2695b31bbedf) )
|
// ROM_LOAD( "loc-2.fil", 0x1c00, 0x0800, CRC(2ca902ac) SHA1(39d2728194933527f2aa4b2f5c2b2695b31bbedf) )
|
||||||
// ROM_LOAD( "loc-4.fil", 0x0c00, 0x0800, CRC(c370a033) SHA1(e21c008662d7253d0eabf68832f93eb458999748) )
|
// ROM_LOAD( "loc-4.fil", 0x0c00, 0x0800, CRC(c370a033) SHA1(e21c008662d7253d0eabf68832f93eb458999748) )
|
||||||
// ROM_LOAD( "loc-5.fil", 0x1000, 0x0800, CRC(ba1f3e71) SHA1(f691a9b50295a1ec60c85c820c90d4af629ebc9c) )
|
// ROM_LOAD( "loc-5.fil", 0x1000, 0x0800, CRC(ba1f3e71) SHA1(f691a9b50295a1ec60c85c820c90d4af629ebc9c) )
|
||||||
|
|
||||||
/*--------------------------------
|
/*--------------------------------
|
||||||
/ Shooting the Rapids (04/79)
|
/ Shooting the Rapids (04/79)
|
||||||
@ -823,9 +823,9 @@ ROM_START(sshtlzac)
|
|||||||
ROM_REGION(0x1000, "audiocpu", ROMREGION_ERASEFF)
|
ROM_REGION(0x1000, "audiocpu", ROMREGION_ERASEFF)
|
||||||
ROM_LOAD("spcshtl.snd", 0x0000, 0x0800, CRC(9a61781c) SHA1(0293640653d8cc9532debd31bbb70f025b4e6d03))
|
ROM_LOAD("spcshtl.snd", 0x0000, 0x0800, CRC(9a61781c) SHA1(0293640653d8cc9532debd31bbb70f025b4e6d03))
|
||||||
// Alternate dumps
|
// Alternate dumps
|
||||||
// ROM_LOAD( "campioneflash1-2-3.bin", 0x0000, 0x0800, CRC(61894206) SHA1(f78724b416c27c26990ad28c1c4f5376353be55b) )
|
// ROM_LOAD( "campioneflash1-2-3.bin", 0x0000, 0x0800, CRC(61894206) SHA1(f78724b416c27c26990ad28c1c4f5376353be55b) )
|
||||||
// ROM_LOAD( "flash17.bin", 0x0000, 0x0800, CRC(5049326d) SHA1(3b2f4ea054962bf4ba41d46663b7d3d9a77590ef) )
|
// ROM_LOAD( "flash17.bin", 0x0000, 0x0800, CRC(5049326d) SHA1(3b2f4ea054962bf4ba41d46663b7d3d9a77590ef) )
|
||||||
// ROM_LOAD( "spaceshuttle3.bin", 0x0800, 0x0400, CRC(c6a95dfc) SHA1(135e65264455da41c35a68378227b1b84517f98c) )
|
// ROM_LOAD( "spaceshuttle3.bin", 0x0800, 0x0400, CRC(c6a95dfc) SHA1(135e65264455da41c35a68378227b1b84517f98c) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
/*--------------------------------
|
/*--------------------------------
|
||||||
@ -862,8 +862,8 @@ ROM_START(stargodb) // alternate version of the stargod set, with variable repla
|
|||||||
ROM_LOAD ( "stargod.u5", 0x1000, 0x0400, CRC(536484f8) SHA1(7c40bf7e8b5b21cce44d96633581730ea9eeb176))
|
ROM_LOAD ( "stargod.u5", 0x1000, 0x0400, CRC(536484f8) SHA1(7c40bf7e8b5b21cce44d96633581730ea9eeb176))
|
||||||
ROM_END
|
ROM_END
|
||||||
// Alternate stargod dumps (not working)
|
// Alternate stargod dumps (not working)
|
||||||
// ROM_LOAD( "stargod5.lgc", 0x1000, 0x0400, CRC(03cd4e24) SHA1(b73d383dc71e44277de9116a702b899a54ce32b9) )
|
// ROM_LOAD( "stargod5.lgc", 0x1000, 0x0400, CRC(03cd4e24) SHA1(b73d383dc71e44277de9116a702b899a54ce32b9) )
|
||||||
// ROM_LOAD( "stargod.snd", 0x7800, 0x0800, CRC(5079e493) SHA1(51d366cdd09ad00b8b016b0ea1c85ac95ef94d71) )
|
// ROM_LOAD( "stargod.snd", 0x7800, 0x0800, CRC(5079e493) SHA1(51d366cdd09ad00b8b016b0ea1c85ac95ef94d71) )
|
||||||
|
|
||||||
/*--------------------------------
|
/*--------------------------------
|
||||||
/ Winter Sports (01/78)
|
/ Winter Sports (01/78)
|
||||||
|
@ -189,8 +189,8 @@ private:
|
|||||||
void rmni_sound_reset();
|
void rmni_sound_reset();
|
||||||
void mouse_js_reset();
|
void mouse_js_reset();
|
||||||
void check_scsi_irq();
|
void check_scsi_irq();
|
||||||
void set_scsi_drqlat(bool clock, bool clear);
|
void set_scsi_drqlat(bool clock, bool clear);
|
||||||
|
|
||||||
int m_scsi_iena;
|
int m_scsi_iena;
|
||||||
int m_scsi_msg;
|
int m_scsi_msg;
|
||||||
int m_scsi_bsy;
|
int m_scsi_bsy;
|
||||||
@ -224,8 +224,8 @@ private:
|
|||||||
/* Mouse/Joystick */
|
/* Mouse/Joystick */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int8_t m_mouse_x;
|
int8_t m_mouse_x;
|
||||||
int8_t m_mouse_y;
|
int8_t m_mouse_y;
|
||||||
|
|
||||||
uint8_t m_mouse_pcx;
|
uint8_t m_mouse_pcx;
|
||||||
uint8_t m_mouse_pcy;
|
uint8_t m_mouse_pcy;
|
||||||
|
@ -109,16 +109,16 @@ chdman createhd -o ST125N.chd -chs 41921,1,1 -ss 512
|
|||||||
#define MOUSE_INT_ENABLE 0x08
|
#define MOUSE_INT_ENABLE 0x08
|
||||||
#define PC8031_INT_ENABLE 0x10
|
#define PC8031_INT_ENABLE 0x10
|
||||||
|
|
||||||
#define MOUSE_NONE 0x00
|
#define MOUSE_NONE 0x00
|
||||||
#define MOUSE_LEFT 0x01
|
#define MOUSE_LEFT 0x01
|
||||||
#define MOUSE_RIGHT 0x02
|
#define MOUSE_RIGHT 0x02
|
||||||
#define MOUSE_DOWN 0x04
|
#define MOUSE_DOWN 0x04
|
||||||
#define MOUSE_UP 0x08
|
#define MOUSE_UP 0x08
|
||||||
#define MOUSE_LBUTTON 0x10
|
#define MOUSE_LBUTTON 0x10
|
||||||
#define MOUSE_RBUTTON 0x20
|
#define MOUSE_RBUTTON 0x20
|
||||||
|
|
||||||
// Frequency in Hz to poll for mouse movement.
|
// Frequency in Hz to poll for mouse movement.
|
||||||
#define MOUSE_POLL_FREQUENCY 5000
|
#define MOUSE_POLL_FREQUENCY 5000
|
||||||
|
|
||||||
#define MOUSE_INT_ENABLED(state) (((state)->m_iou_reg092 & MOUSE_INT_ENABLE) ? 1 : 0)
|
#define MOUSE_INT_ENABLED(state) (((state)->m_iou_reg092 & MOUSE_INT_ENABLE) ? 1 : 0)
|
||||||
|
|
||||||
@ -1163,14 +1163,14 @@ void rmnimbus_state::hdc_reset()
|
|||||||
m_scsi_req = 0;
|
m_scsi_req = 0;
|
||||||
|
|
||||||
// Latched req, IC11b
|
// Latched req, IC11b
|
||||||
m_scsi_reqlat = 0;
|
m_scsi_reqlat = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The SCSI code outputs a 1 to indicate an active line, even though it is active low
|
The SCSI code outputs a 1 to indicate an active line, even though it is active low
|
||||||
The inputs on the RM schematic are fed through inverters, but because of the above
|
The inputs on the RM schematic are fed through inverters, but because of the above
|
||||||
we don't need to invert them, unless the schematic uses the signal directly
|
we don't need to invert them, unless the schematic uses the signal directly
|
||||||
For consistency we will invert msg before latching.
|
For consistency we will invert msg before latching.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void rmnimbus_state::check_scsi_irq()
|
void rmnimbus_state::check_scsi_irq()
|
||||||
@ -1185,13 +1185,13 @@ WRITE_LINE_MEMBER(rmnimbus_state::write_scsi_iena)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This emulates the 74LS74 latched version of req
|
// This emulates the 74LS74 latched version of req
|
||||||
void rmnimbus_state::set_scsi_drqlat(bool clock, bool clear)
|
void rmnimbus_state::set_scsi_drqlat(bool clock, bool clear)
|
||||||
{
|
{
|
||||||
if (clear)
|
if (clear)
|
||||||
m_scsi_reqlat = 0;
|
m_scsi_reqlat = 0;
|
||||||
else if (clock)
|
else if (clock)
|
||||||
m_scsi_reqlat = 1;
|
m_scsi_reqlat = 1;
|
||||||
|
|
||||||
if(m_scsi_reqlat)
|
if(m_scsi_reqlat)
|
||||||
hdc_drq(true);
|
hdc_drq(true);
|
||||||
else
|
else
|
||||||
@ -1202,9 +1202,9 @@ void rmnimbus_state::hdc_post_rw()
|
|||||||
{
|
{
|
||||||
if(m_scsi_req)
|
if(m_scsi_req)
|
||||||
m_scsibus->write_ack(1);
|
m_scsibus->write_ack(1);
|
||||||
|
|
||||||
// IC17A, IC17B, latched req cleared by SCSI data read or write, or C/D= command
|
// IC17A, IC17B, latched req cleared by SCSI data read or write, or C/D= command
|
||||||
set_scsi_drqlat(false, true);
|
set_scsi_drqlat(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rmnimbus_state::hdc_drq(bool state)
|
void rmnimbus_state::hdc_drq(bool state)
|
||||||
@ -1220,10 +1220,10 @@ WRITE_LINE_MEMBER( rmnimbus_state::write_scsi_bsy )
|
|||||||
WRITE_LINE_MEMBER( rmnimbus_state::write_scsi_cd )
|
WRITE_LINE_MEMBER( rmnimbus_state::write_scsi_cd )
|
||||||
{
|
{
|
||||||
m_scsi_cd = state;
|
m_scsi_cd = state;
|
||||||
|
|
||||||
// IC17A, IC17B, latched req cleared by SCSI data read or write, or C/D= command
|
// IC17A, IC17B, latched req cleared by SCSI data read or write, or C/D= command
|
||||||
set_scsi_drqlat(false, !m_scsi_cd);
|
set_scsi_drqlat(false, !m_scsi_cd);
|
||||||
|
|
||||||
check_scsi_irq();
|
check_scsi_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1247,16 +1247,16 @@ WRITE_LINE_MEMBER( rmnimbus_state::write_scsi_req )
|
|||||||
{
|
{
|
||||||
// Detect rising edge on req, IC11b, clock
|
// Detect rising edge on req, IC11b, clock
|
||||||
int rising = ((m_scsi_req == 0) && (state == 1));
|
int rising = ((m_scsi_req == 0) && (state == 1));
|
||||||
|
|
||||||
// This is the state of the actual line from the SCSI
|
// This is the state of the actual line from the SCSI
|
||||||
m_scsi_req = state;
|
m_scsi_req = state;
|
||||||
|
|
||||||
// Latched req, is forced low by C/D being set to command
|
// Latched req, is forced low by C/D being set to command
|
||||||
set_scsi_drqlat(rising, m_scsi_cd);
|
set_scsi_drqlat(rising, m_scsi_cd);
|
||||||
|
|
||||||
if (!m_scsi_reqlat)
|
if (!m_scsi_reqlat)
|
||||||
m_scsibus->write_ack(0);
|
m_scsibus->write_ack(0);
|
||||||
|
|
||||||
check_scsi_irq();
|
check_scsi_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1551,41 +1551,41 @@ void rmnimbus_state::mouse_js_reset()
|
|||||||
|
|
||||||
void rmnimbus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
void rmnimbus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
{
|
{
|
||||||
int mouse_x = 0; // Current mouse X and Y
|
int mouse_x = 0; // Current mouse X and Y
|
||||||
int mouse_y = 0;
|
int mouse_y = 0;
|
||||||
int xdiff = 0; // Difference from previous X and Y
|
int xdiff = 0; // Difference from previous X and Y
|
||||||
int ydiff = 0;
|
int ydiff = 0;
|
||||||
|
|
||||||
uint8_t intstate_x; // Used to calculate if we should trigger interrupt
|
uint8_t intstate_x; // Used to calculate if we should trigger interrupt
|
||||||
uint8_t intstate_y;
|
uint8_t intstate_y;
|
||||||
int xint; // X and Y interrupts to trigger
|
int xint; // X and Y interrupts to trigger
|
||||||
int yint;
|
int yint;
|
||||||
|
|
||||||
uint8_t mxa; // Values of quadrature encoders for X and Y
|
uint8_t mxa; // Values of quadrature encoders for X and Y
|
||||||
uint8_t mxb;
|
uint8_t mxb;
|
||||||
uint8_t mya;
|
uint8_t mya;
|
||||||
uint8_t myb;
|
uint8_t myb;
|
||||||
|
|
||||||
// Read mouse buttons
|
// Read mouse buttons
|
||||||
m_nimbus_mouse.m_reg0a4 = m_io_mouse_button->read();
|
m_nimbus_mouse.m_reg0a4 = m_io_mouse_button->read();
|
||||||
|
|
||||||
// Read mose positions and calculate difference from previous value
|
// Read mose positions and calculate difference from previous value
|
||||||
mouse_x = m_io_mousex->read();
|
mouse_x = m_io_mousex->read();
|
||||||
mouse_y = m_io_mousey->read();
|
mouse_y = m_io_mousey->read();
|
||||||
|
|
||||||
xdiff = m_nimbus_mouse.m_mouse_x - mouse_x;
|
xdiff = m_nimbus_mouse.m_mouse_x - mouse_x;
|
||||||
ydiff = m_nimbus_mouse.m_mouse_y - mouse_y;
|
ydiff = m_nimbus_mouse.m_mouse_y - mouse_y;
|
||||||
|
|
||||||
// check and compensate for wrap.....
|
// check and compensate for wrap.....
|
||||||
if (xdiff > 0x80)
|
if (xdiff > 0x80)
|
||||||
xdiff -= 0x100;
|
xdiff -= 0x100;
|
||||||
else if (xdiff < -0x80)
|
else if (xdiff < -0x80)
|
||||||
xdiff += 0x100;
|
xdiff += 0x100;
|
||||||
|
|
||||||
if (ydiff > 0x80)
|
if (ydiff > 0x80)
|
||||||
ydiff -= 0x100;
|
ydiff -= 0x100;
|
||||||
else if (ydiff < -0x80)
|
else if (ydiff < -0x80)
|
||||||
ydiff += 0x100;
|
ydiff += 0x100;
|
||||||
|
|
||||||
// convert movement into emulated movement of quadrature encoder in mouse.
|
// convert movement into emulated movement of quadrature encoder in mouse.
|
||||||
if (xdiff < 0)
|
if (xdiff < 0)
|
||||||
@ -1597,7 +1597,7 @@ void rmnimbus_state::device_timer(emu_timer &timer, device_timer_id id, int para
|
|||||||
m_nimbus_mouse.m_mouse_pcy++;
|
m_nimbus_mouse.m_mouse_pcy++;
|
||||||
else if (ydiff > 0)
|
else if (ydiff > 0)
|
||||||
m_nimbus_mouse.m_mouse_pcy--;
|
m_nimbus_mouse.m_mouse_pcy--;
|
||||||
|
|
||||||
// Compensate for quadrature wrap.
|
// Compensate for quadrature wrap.
|
||||||
m_nimbus_mouse.m_mouse_pcx &= 0x03;
|
m_nimbus_mouse.m_mouse_pcx &= 0x03;
|
||||||
m_nimbus_mouse.m_mouse_pcy &= 0x03;
|
m_nimbus_mouse.m_mouse_pcy &= 0x03;
|
||||||
|
@ -497,8 +497,8 @@ void st0016_cpu_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip
|
|||||||
/*
|
/*
|
||||||
if (plx | ply) //parent
|
if (plx | ply) //parent
|
||||||
{
|
{
|
||||||
lx = plx;
|
lx = plx;
|
||||||
ly = ply;
|
ly = ply;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
operation by disassembling the Nimbus bios and by writing experemental
|
operation by disassembling the Nimbus bios and by writing experemental
|
||||||
code on the real machine.
|
code on the real machine.
|
||||||
|
|
||||||
2021-09-29, P.Harvey-Smith.
|
2021-09-29, P.Harvey-Smith.
|
||||||
|
|
||||||
I now have access to the service manual for the Nimbus, this documents to facilities provided
|
I now have access to the service manual for the Nimbus, this documents to facilities provided
|
||||||
by the video chip, which will hopefully allow a much more accurate implementation.
|
by the video chip, which will hopefully allow a much more accurate implementation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -36,92 +36,92 @@
|
|||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Acording to the service manual the Nimbus should be capable of the following modes :
|
Acording to the service manual the Nimbus should be capable of the following modes :
|
||||||
|
|
||||||
320 x 200 4bpp
|
320 x 200 4bpp
|
||||||
640 x 200 2bpp
|
640 x 200 2bpp
|
||||||
400 x 200 4bpp
|
400 x 200 4bpp
|
||||||
800 x 200 2bpp
|
800 x 200 2bpp
|
||||||
320 x 250 4bpp
|
320 x 250 4bpp
|
||||||
640 x 250 2bpp
|
640 x 250 2bpp
|
||||||
400 x 250 4bpp
|
400 x 250 4bpp
|
||||||
800 x 250 2bpp
|
800 x 250 2bpp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
From the service manual the registers are defined as follows :
|
||||||
|
|
||||||
/*
|
|
||||||
From the service manual the registers are defined as follows :
|
|
||||||
|
|
||||||
Ports 0x00-0x1E are the registers used to update the display RAM thus :
|
Ports 0x00-0x1E are the registers used to update the display RAM thus :
|
||||||
|
|
||||||
Addr m_x m_y Update memory on write?
|
Addr m_x m_y Update memory on write?
|
||||||
0x00 nop nop no
|
0x00 nop nop no
|
||||||
0x02 load nop no
|
0x02 load nop no
|
||||||
0x04 nop inc no
|
0x04 nop inc no
|
||||||
0x06 load inc no
|
0x06 load inc no
|
||||||
0x08 nop nop no
|
0x08 nop nop no
|
||||||
0x0A inc nop no
|
0x0A inc nop no
|
||||||
0x0C nop load no
|
0x0C nop load no
|
||||||
0x0E inc load no
|
0x0E inc load no
|
||||||
0x10 nop nop yes
|
0x10 nop nop yes
|
||||||
0x12 load nop yes
|
0x12 load nop yes
|
||||||
0x14 nop inc yes
|
0x14 nop inc yes
|
||||||
0x16 load inc yes
|
0x16 load inc yes
|
||||||
0x18 nop nop yes
|
0x18 nop nop yes
|
||||||
0x1A inc nop yes
|
0x1A inc nop yes
|
||||||
0x1C nop load yes
|
0x1C nop load yes
|
||||||
0x1E inc load yes
|
0x1E inc load yes
|
||||||
|
|
||||||
0x20 scroll port, contains 8 bit scroll address
|
0x20 scroll port, contains 8 bit scroll address
|
||||||
|
|
||||||
0x22 Update mode control port (up_mode), controls how data is written to display ram.
|
0x22 Update mode control port (up_mode), controls how data is written to display ram.
|
||||||
see UPMODE_ constants below
|
see UPMODE_ constants below
|
||||||
|
|
||||||
0x24h Intensity port, provides current logical intensities for update operations
|
0x24h Intensity port, provides current logical intensities for update operations
|
||||||
bits 0..3 Foreground
|
bits 0..3 Foreground
|
||||||
bits 4..7 Background
|
bits 4..7 Background
|
||||||
|
|
||||||
0x26 Display mode (m_mode) current display mode and border colour.
|
0x26 Display mode (m_mode) current display mode and border colour.
|
||||||
see MODE_ constants below
|
see MODE_ constants below
|
||||||
|
|
||||||
For READ.
|
For READ.
|
||||||
Ports 0x28, 0x2A, 0x2C and 0x2E have different read and write functions :
|
Ports 0x28, 0x2A, 0x2C and 0x2E have different read and write functions :
|
||||||
|
|
||||||
0x28 Timing / status, all bits active high
|
0x28 Timing / status, all bits active high
|
||||||
bit 0 line blank
|
bit 0 line blank
|
||||||
bit 1 line display
|
bit 1 line display
|
||||||
bit 2 frame blank
|
bit 2 frame blank
|
||||||
bit 3 frame display
|
bit 3 frame display
|
||||||
|
|
||||||
0x2A X address status, returns current value of X counter (m_x)
|
|
||||||
|
|
||||||
0x2C Y address status, returns current value of Y counter (m_y)
|
0x2A X address status, returns current value of X counter (m_x)
|
||||||
|
|
||||||
|
0x2C Y address status, returns current value of Y counter (m_y)
|
||||||
|
|
||||||
For Write
|
For Write
|
||||||
|
|
||||||
0x28, 0x2A, 0x2C, 0x2E Colour look up table :
|
0x28, 0x2A, 0x2C, 0x2E Colour look up table :
|
||||||
|
|
||||||
Logic colour
|
Logic colour
|
||||||
Port Bits Low res High Res
|
Port Bits Low res High Res
|
||||||
0x28 0..3 0 0
|
0x28 0..3 0 0
|
||||||
0x28 4..7 1 0
|
0x28 4..7 1 0
|
||||||
0x28 8..11 2 0
|
0x28 8..11 2 0
|
||||||
0x28 12..15 3 0
|
0x28 12..15 3 0
|
||||||
|
|
||||||
0x2A 0..3 3 1
|
0x2A 0..3 3 1
|
||||||
0x2A 4..7 5 1
|
0x2A 4..7 5 1
|
||||||
0x2A 8..11 6 1
|
0x2A 8..11 6 1
|
||||||
0x2A 12..15 7 1
|
0x2A 12..15 7 1
|
||||||
|
|
||||||
0x2C 0..3 8 2
|
0x2C 0..3 8 2
|
||||||
0x2C 4..7 9 2
|
0x2C 4..7 9 2
|
||||||
0x2C 8..11 10 2
|
0x2C 8..11 10 2
|
||||||
0x2C 12..15 11 2
|
0x2C 12..15 11 2
|
||||||
|
|
||||||
0x2E 0..3 12 3
|
0x2E 0..3 12 3
|
||||||
0x2E 4..7 13 3
|
0x2E 4..7 13 3
|
||||||
0x2E 8..11 14 3
|
0x2E 8..11 14 3
|
||||||
0x2E 12..15 15 3
|
0x2E 12..15 15 3
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -129,47 +129,47 @@ Port Bits Low res High Res
|
|||||||
// In following definitions ports are the WORD offset, the RM manual
|
// In following definitions ports are the WORD offset, the RM manual
|
||||||
// lists them by the byte offset so they are 2* the value
|
// lists them by the byte offset so they are 2* the value
|
||||||
|
|
||||||
#define P_SCROLL 0x10
|
#define P_SCROLL 0x10
|
||||||
#define P_UPDATE_MODE 0x11
|
#define P_UPDATE_MODE 0x11
|
||||||
#define P_INTENSITY 0x12
|
#define P_INTENSITY 0x12
|
||||||
#define P_MODE 0x13
|
#define P_MODE 0x13
|
||||||
#define P_STATUS 0x14
|
#define P_STATUS 0x14
|
||||||
#define P_X_COUNT 0x15
|
#define P_X_COUNT 0x15
|
||||||
#define P_Y_COUNT 0x16
|
#define P_Y_COUNT 0x16
|
||||||
|
|
||||||
#define P_COLOUR03 0x14
|
#define P_COLOUR03 0x14
|
||||||
#define P_COLOUR47 0x15
|
#define P_COLOUR47 0x15
|
||||||
#define P_COLOUR8B 0x16
|
#define P_COLOUR8B 0x16
|
||||||
#define P_COLOURCF 0x17
|
#define P_COLOURCF 0x17
|
||||||
|
|
||||||
// From the service manual, Reg022 update mode constants :
|
// From the service manual, Reg022 update mode constants :
|
||||||
// The first 8 are NON XOR writes
|
// The first 8 are NON XOR writes
|
||||||
#define UPMODE_40_TEXT 0x00 // 40 character text
|
#define UPMODE_40_TEXT 0x00 // 40 character text
|
||||||
#define UPMODE_80_TEXT 0x01 // 80 character text
|
#define UPMODE_80_TEXT 0x01 // 80 character text
|
||||||
#define UPMODE_LO_PIXEL 0x02 // Low res pixel
|
#define UPMODE_LO_PIXEL 0x02 // Low res pixel
|
||||||
#define UPMODE_HI_PIXEL 0x03 // Hi res pixel
|
#define UPMODE_HI_PIXEL 0x03 // Hi res pixel
|
||||||
#define UPMODE_ANIMATION 0x04 // Animation (mask + data)
|
#define UPMODE_ANIMATION 0x04 // Animation (mask + data)
|
||||||
#define UPMODE_SCROLL 0x05 // Scroll mode
|
#define UPMODE_SCROLL 0x05 // Scroll mode
|
||||||
#define UPMODE_DIRECT 0x06 // Direct write to video ram
|
#define UPMODE_DIRECT 0x06 // Direct write to video ram
|
||||||
#define UPMODE_ILLEGAL7 0x07
|
#define UPMODE_ILLEGAL7 0x07
|
||||||
|
|
||||||
// The second 8 are XOR writes
|
// The second 8 are XOR writes
|
||||||
#define UPMODE_40_TEXT_X 0x08
|
#define UPMODE_40_TEXT_X 0x08
|
||||||
#define UPMODE_80_TEXT_X 0x09
|
#define UPMODE_80_TEXT_X 0x09
|
||||||
#define UPMODE_LO_PIXEL_X 0x0A
|
#define UPMODE_LO_PIXEL_X 0x0A
|
||||||
#define UPMODE_HI_PIXEL_X 0x0B
|
#define UPMODE_HI_PIXEL_X 0x0B
|
||||||
#define UPMODE_ANIMATION_X 0x0C
|
#define UPMODE_ANIMATION_X 0x0C
|
||||||
#define UPMODE_SCROLL_X 0x0D
|
#define UPMODE_SCROLL_X 0x0D
|
||||||
#define UPMODE_DIRECT_X 0x0E
|
#define UPMODE_DIRECT_X 0x0E
|
||||||
#define UPMODE_ILLEGALF 0x0F
|
#define UPMODE_ILLEGALF 0x0F
|
||||||
|
|
||||||
#define UP_XOR_MASK 0x08
|
#define UP_XOR_MASK 0x08
|
||||||
|
|
||||||
// port 026, display mode (m_mode)
|
// port 026, display mode (m_mode)
|
||||||
#define MODE_BORDER 0x0F // bits 0..3, Border colour number
|
#define MODE_BORDER 0x0F // bits 0..3, Border colour number
|
||||||
#define MODE_RESOLUTION 0x10 // bit 4, 0=low res (40 col), high = high res (80 col)
|
#define MODE_RESOLUTION 0x10 // bit 4, 0=low res (40 col), high = high res (80 col)
|
||||||
#define MODE_WIDTH 0x20 // bit 5, 0=narrow, 1=wide
|
#define MODE_WIDTH 0x20 // bit 5, 0=narrow, 1=wide
|
||||||
#define MODE_HEIGHT 0x40 // bit 6, 0=625 lines, 1=562
|
#define MODE_HEIGHT 0x40 // bit 6, 0=625 lines, 1=562
|
||||||
|
|
||||||
#define WIDTH_MASK 0x07
|
#define WIDTH_MASK 0x07
|
||||||
|
|
||||||
@ -604,7 +604,7 @@ void rmnimbus_state::write_pixel_data(uint16_t x, uint16_t y, uint16_t data)
|
|||||||
// Colours are encoded as follows :
|
// Colours are encoded as follows :
|
||||||
// Each nibble contains a colour encoded as igrb
|
// Each nibble contains a colour encoded as igrb
|
||||||
// so we shift through the specified colours and extract the bits, to set the palette.
|
// so we shift through the specified colours and extract the bits, to set the palette.
|
||||||
//
|
//
|
||||||
void rmnimbus_state::change_palette(uint8_t bank, uint16_t colours)
|
void rmnimbus_state::change_palette(uint8_t bank, uint16_t colours)
|
||||||
{
|
{
|
||||||
// loop over changing colours
|
// loop over changing colours
|
||||||
|
@ -148,8 +148,8 @@
|
|||||||
borderType:[watchScroll borderType]];
|
borderType:[watchScroll borderType]];
|
||||||
NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize]
|
NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize]
|
||||||
hasHorizontalScroller:YES
|
hasHorizontalScroller:YES
|
||||||
hasVerticalScroller:YES
|
hasVerticalScroller:YES
|
||||||
borderType:[registerScroll borderType]];
|
borderType:[registerScroll borderType]];
|
||||||
NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }),
|
NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }),
|
||||||
std::max({ breakDesired.height, watchDesired.height, registerDesired.height }));
|
std::max({ breakDesired.height, watchDesired.height, registerDesired.height }));
|
||||||
[self cascadeWindowWithDesiredSize:desired forView:tabs];
|
[self cascadeWindowWithDesiredSize:desired forView:tabs];
|
||||||
|
Loading…
Reference in New Issue
Block a user