mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
some handmade changes (nw)
This commit is contained in:
parent
1fefd835ce
commit
a55ab6d615
@ -70,7 +70,7 @@ sns_rom_bsmempak_device::sns_rom_bsmempak_device(const machine_config &mconfig,
|
|||||||
|
|
||||||
void sns_rom_bsx_device::device_start()
|
void sns_rom_bsx_device::device_start()
|
||||||
{
|
{
|
||||||
m_base_unit = auto_alloc(machine(), BSX_base(machine()));
|
m_base_unit = std::make_unique<BSX_base>(machine());
|
||||||
m_base_unit->init();
|
m_base_unit->init();
|
||||||
|
|
||||||
memset(m_cart_regs, 0x00, sizeof(m_cart_regs));
|
memset(m_cart_regs, 0x00, sizeof(m_cart_regs));
|
||||||
|
@ -51,7 +51,7 @@ public:
|
|||||||
virtual DECLARE_WRITE8_MEMBER(chip_write) override;
|
virtual DECLARE_WRITE8_MEMBER(chip_write) override;
|
||||||
|
|
||||||
// base regs
|
// base regs
|
||||||
BSX_base *m_base_unit;
|
std::unique_ptr<BSX_base> m_base_unit;
|
||||||
|
|
||||||
// cart regs
|
// cart regs
|
||||||
UINT8 m_cart_regs[16];
|
UINT8 m_cart_regs[16];
|
||||||
|
@ -369,20 +369,20 @@ void SDD1_OL::OL_launch(UINT8 *ROM, UINT32 *mmc)
|
|||||||
SDD1_emu::SDD1_emu(running_machine &machine)
|
SDD1_emu::SDD1_emu(running_machine &machine)
|
||||||
: m_machine(machine)
|
: m_machine(machine)
|
||||||
{
|
{
|
||||||
m_IM = auto_alloc(machine, SDD1_IM());
|
m_IM = std::make_unique<SDD1_IM>();
|
||||||
m_GCD = auto_alloc(machine, SDD1_GCD(m_IM));
|
m_GCD = std::make_unique<SDD1_GCD>(m_IM.get());
|
||||||
m_BG0 = auto_alloc(machine, SDD1_BG(m_GCD, 0));
|
m_BG0 = std::make_unique<SDD1_BG>(m_GCD.get(), 0);
|
||||||
m_BG1 = auto_alloc(machine, SDD1_BG(m_GCD, 1));
|
m_BG1 = std::make_unique<SDD1_BG>(m_GCD.get(), 1);
|
||||||
m_BG2 = auto_alloc(machine, SDD1_BG(m_GCD, 2));
|
m_BG2 = std::make_unique<SDD1_BG>(m_GCD.get(), 2);
|
||||||
m_BG3 = auto_alloc(machine, SDD1_BG(m_GCD, 3));
|
m_BG3 = std::make_unique<SDD1_BG>(m_GCD.get(), 3);
|
||||||
m_BG4 = auto_alloc(machine, SDD1_BG(m_GCD, 4));
|
m_BG4 = std::make_unique<SDD1_BG>(m_GCD.get(), 4);
|
||||||
m_BG5 = auto_alloc(machine, SDD1_BG(m_GCD, 5));
|
m_BG5 = std::make_unique<SDD1_BG>(m_GCD.get(), 5);
|
||||||
m_BG6 = auto_alloc(machine, SDD1_BG(m_GCD, 6));
|
m_BG6 = std::make_unique<SDD1_BG>(m_GCD.get(), 6);
|
||||||
m_BG7 = auto_alloc(machine, SDD1_BG(m_GCD, 7));
|
m_BG7 = std::make_unique<SDD1_BG>(m_GCD.get(), 7);
|
||||||
m_PEM = auto_alloc(machine, SDD1_PEM(m_BG0, m_BG1, m_BG2, m_BG3,
|
m_PEM = std::make_unique<SDD1_PEM>(m_BG0.get(), m_BG1.get(), m_BG2.get(), m_BG3.get(),
|
||||||
m_BG4, m_BG5, m_BG6, m_BG7));
|
m_BG4.get(), m_BG5.get(), m_BG6.get(), m_BG7.get());
|
||||||
m_CM = auto_alloc(machine, SDD1_CM(m_PEM));
|
m_CM = std::make_unique<SDD1_CM>(m_PEM.get());
|
||||||
m_OL = auto_alloc(machine, SDD1_OL(m_CM));
|
m_OL = std::make_unique<SDD1_OL>(m_CM.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDD1_emu::SDD1emu_decompress(UINT8 *ROM, UINT32 *mmc, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf)
|
void SDD1_emu::SDD1emu_decompress(UINT8 *ROM, UINT32 *mmc, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf)
|
||||||
@ -426,7 +426,7 @@ sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, const ch
|
|||||||
|
|
||||||
void sns_rom_sdd1_device::device_start()
|
void sns_rom_sdd1_device::device_start()
|
||||||
{
|
{
|
||||||
m_sdd1emu = auto_alloc(machine(), SDD1_emu(machine()));
|
m_sdd1emu = std::make_unique<SDD1_emu>(machine());
|
||||||
|
|
||||||
m_buffer.data = std::make_unique<UINT8[]>(0x10000);
|
m_buffer.data = std::make_unique<UINT8[]>(0x10000);
|
||||||
m_buffer.ready = 0;
|
m_buffer.ready = 0;
|
||||||
|
@ -126,13 +126,19 @@ public:
|
|||||||
|
|
||||||
running_machine &machine() const { return m_machine; }
|
running_machine &machine() const { return m_machine; }
|
||||||
|
|
||||||
SDD1_IM* m_IM;
|
std::unique_ptr<SDD1_IM> m_IM;
|
||||||
SDD1_GCD* m_GCD;
|
std::unique_ptr<SDD1_GCD> m_GCD;
|
||||||
SDD1_BG* m_BG0; SDD1_BG* m_BG1; SDD1_BG* m_BG2; SDD1_BG* m_BG3;
|
std::unique_ptr<SDD1_BG> m_BG0;
|
||||||
SDD1_BG* m_BG4; SDD1_BG* m_BG5; SDD1_BG* m_BG6; SDD1_BG* m_BG7;
|
std::unique_ptr<SDD1_BG> m_BG1;
|
||||||
SDD1_PEM* m_PEM;
|
std::unique_ptr<SDD1_BG> m_BG2;
|
||||||
SDD1_CM* m_CM;
|
std::unique_ptr<SDD1_BG> m_BG3;
|
||||||
SDD1_OL* m_OL;
|
std::unique_ptr<SDD1_BG> m_BG4;
|
||||||
|
std::unique_ptr<SDD1_BG> m_BG5;
|
||||||
|
std::unique_ptr<SDD1_BG> m_BG6;
|
||||||
|
std::unique_ptr<SDD1_BG> m_BG7;
|
||||||
|
std::unique_ptr<SDD1_PEM> m_PEM;
|
||||||
|
std::unique_ptr<SDD1_CM> m_CM;
|
||||||
|
std::unique_ptr<SDD1_OL> m_OL;
|
||||||
|
|
||||||
void SDD1emu_decompress(UINT8 *ROM, UINT32 *mmc, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf);
|
void SDD1emu_decompress(UINT8 *ROM, UINT32 *mmc, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf);
|
||||||
|
|
||||||
@ -176,7 +182,7 @@ public:
|
|||||||
UINT16 size; // $43x5-$43x6 -- DMA transfer size
|
UINT16 size; // $43x5-$43x6 -- DMA transfer size
|
||||||
} m_dma[8];
|
} m_dma[8];
|
||||||
|
|
||||||
SDD1_emu* m_sdd1emu;
|
std::unique_ptr<SDD1_emu> m_sdd1emu;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ sns_rom_spc7110rtc_device::sns_rom_spc7110rtc_device(const machine_config &mconf
|
|||||||
|
|
||||||
void sns_rom_spc7110_device::spc7110_start()
|
void sns_rom_spc7110_device::spc7110_start()
|
||||||
{
|
{
|
||||||
m_decomp = auto_alloc(machine(), SPC7110_Decomp(machine()));
|
m_decomp = std::make_unique<SPC7110_Decomp>(machine());
|
||||||
|
|
||||||
// The SPC7110 works in conjunction with 0x2000 of RAM, which is battery backed up (and hence emulated by our m_nvram)
|
// The SPC7110 works in conjunction with 0x2000 of RAM, which is battery backed up (and hence emulated by our m_nvram)
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public:
|
|||||||
UINT8 m_r480b; // decompression control register
|
UINT8 m_r480b; // decompression control register
|
||||||
UINT8 m_r480c; // decompression status
|
UINT8 m_r480c; // decompression status
|
||||||
|
|
||||||
SPC7110_Decomp* m_decomp;
|
std::unique_ptr<SPC7110_Decomp> m_decomp;
|
||||||
|
|
||||||
UINT8 m_r4811; // data pointer low
|
UINT8 m_r4811; // data pointer low
|
||||||
UINT8 m_r4812; // data pointer high
|
UINT8 m_r4812; // data pointer high
|
||||||
|
@ -203,12 +203,10 @@ void mips3_device::device_stop()
|
|||||||
|
|
||||||
if (m_drcfe != nullptr)
|
if (m_drcfe != nullptr)
|
||||||
{
|
{
|
||||||
auto_free(machine(), m_drcfe);
|
|
||||||
m_drcfe = nullptr;
|
m_drcfe = nullptr;
|
||||||
}
|
}
|
||||||
if (m_drcuml != nullptr)
|
if (m_drcuml != nullptr)
|
||||||
{
|
{
|
||||||
auto_free(machine(), m_drcuml);
|
|
||||||
m_drcuml = nullptr;
|
m_drcuml = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,7 +355,7 @@ void mips3_device::device_start()
|
|||||||
|
|
||||||
UINT32 flags = 0;
|
UINT32 flags = 0;
|
||||||
/* initialize the UML generator */
|
/* initialize the UML generator */
|
||||||
m_drcuml = auto_alloc(machine(), drcuml_state(*this, m_cache, flags, 8, 32, 2));
|
m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, flags, 8, 32, 2);
|
||||||
|
|
||||||
/* add symbols for our stuff */
|
/* add symbols for our stuff */
|
||||||
m_drcuml->symbol_add(&m_core->pc, sizeof(m_core->pc), "pc");
|
m_drcuml->symbol_add(&m_core->pc, sizeof(m_core->pc), "pc");
|
||||||
@ -403,7 +401,7 @@ void mips3_device::device_start()
|
|||||||
m_drcuml->symbol_add(&m_fpmode, sizeof(m_fpmode), "fpmode");
|
m_drcuml->symbol_add(&m_fpmode, sizeof(m_fpmode), "fpmode");
|
||||||
|
|
||||||
/* initialize the front-end helper */
|
/* initialize the front-end helper */
|
||||||
m_drcfe = auto_alloc(machine(), mips3_frontend(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE));
|
m_drcfe = std::make_unique<mips3_frontend>(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE);
|
||||||
|
|
||||||
/* allocate memory for cache-local state and initialize it */
|
/* allocate memory for cache-local state and initialize it */
|
||||||
memcpy(m_fpmode, fpmode_source, sizeof(fpmode_source));
|
memcpy(m_fpmode, fpmode_source, sizeof(fpmode_source));
|
||||||
|
@ -409,8 +409,8 @@ private:
|
|||||||
|
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache m_cache; /* pointer to the DRC code cache */
|
drc_cache m_cache; /* pointer to the DRC code cache */
|
||||||
drcuml_state * m_drcuml; /* DRC UML generator state */
|
std::unique_ptr<drcuml_state> m_drcuml; /* DRC UML generator state */
|
||||||
mips3_frontend * m_drcfe; /* pointer to the DRC front-end state */
|
std::unique_ptr<mips3_frontend> m_drcfe; /* pointer to the DRC front-end state */
|
||||||
UINT32 m_drcoptions; /* configurable DRC options */
|
UINT32 m_drcoptions; /* configurable DRC options */
|
||||||
|
|
||||||
/* internal stuff */
|
/* internal stuff */
|
||||||
|
@ -280,7 +280,7 @@ void mips3_device::code_flush_cache()
|
|||||||
|
|
||||||
void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
|
void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
compiler_state compiler = { 0 };
|
compiler_state compiler = { 0 };
|
||||||
const opcode_desc *seqhead, *seqlast;
|
const opcode_desc *seqhead, *seqlast;
|
||||||
const opcode_desc *desclist;
|
const opcode_desc *desclist;
|
||||||
@ -553,7 +553,7 @@ static void cfunc_unimplemented(void *param)
|
|||||||
|
|
||||||
void mips3_device::static_generate_entry_point()
|
void mips3_device::static_generate_entry_point()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
code_label skip = 1;
|
code_label skip = 1;
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
@ -601,7 +601,7 @@ void mips3_device::static_generate_entry_point()
|
|||||||
|
|
||||||
void mips3_device::static_generate_nocode_handler()
|
void mips3_device::static_generate_nocode_handler()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -626,7 +626,7 @@ void mips3_device::static_generate_nocode_handler()
|
|||||||
|
|
||||||
void mips3_device::static_generate_out_of_cycles()
|
void mips3_device::static_generate_out_of_cycles()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -651,7 +651,7 @@ void mips3_device::static_generate_out_of_cycles()
|
|||||||
|
|
||||||
void mips3_device::static_generate_tlb_mismatch()
|
void mips3_device::static_generate_tlb_mismatch()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* forward references */
|
/* forward references */
|
||||||
@ -702,7 +702,7 @@ void mips3_device::static_generate_tlb_mismatch()
|
|||||||
void mips3_device::static_generate_exception(UINT8 exception, int recover, const char *name)
|
void mips3_device::static_generate_exception(UINT8 exception, int recover, const char *name)
|
||||||
{
|
{
|
||||||
code_handle *&exception_handle = recover ? m_exception[exception] : m_exception_norecover[exception];
|
code_handle *&exception_handle = recover ? m_exception[exception] : m_exception_norecover[exception];
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
UINT32 offset = 0x180;
|
UINT32 offset = 0x180;
|
||||||
code_label next = 1;
|
code_label next = 1;
|
||||||
code_label skip = 2;
|
code_label skip = 2;
|
||||||
@ -805,7 +805,7 @@ void mips3_device::static_generate_memory_accessor(int mode, int size, int iswri
|
|||||||
code_handle &exception_tlb = *m_exception[iswrite ? EXCEPTION_TLBSTORE : EXCEPTION_TLBLOAD];
|
code_handle &exception_tlb = *m_exception[iswrite ? EXCEPTION_TLBSTORE : EXCEPTION_TLBLOAD];
|
||||||
code_handle &exception_tlbfill = *m_exception[iswrite ? EXCEPTION_TLBSTORE_FILL : EXCEPTION_TLBLOAD_FILL];
|
code_handle &exception_tlbfill = *m_exception[iswrite ? EXCEPTION_TLBSTORE_FILL : EXCEPTION_TLBLOAD_FILL];
|
||||||
code_handle &exception_addrerr = *m_exception[iswrite ? EXCEPTION_ADDRSTORE : EXCEPTION_ADDRLOAD];
|
code_handle &exception_addrerr = *m_exception[iswrite ? EXCEPTION_ADDRSTORE : EXCEPTION_ADDRLOAD];
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
int tlbmiss = 0;
|
int tlbmiss = 0;
|
||||||
int label = 1;
|
int label = 1;
|
||||||
|
@ -537,8 +537,8 @@ protected:
|
|||||||
|
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache m_cache; /* pointer to the DRC code cache */
|
drc_cache m_cache; /* pointer to the DRC code cache */
|
||||||
drcuml_state * m_drcuml; /* DRC UML generator state */
|
std::unique_ptr<drcuml_state> m_drcuml; /* DRC UML generator state */
|
||||||
ppc_frontend * m_drcfe; /* pointer to the DRC front-end state */
|
std::unique_ptr<ppc_frontend> m_drcfe; /* pointer to the DRC front-end state */
|
||||||
UINT32 m_drcoptions; /* configurable DRC options */
|
UINT32 m_drcoptions; /* configurable DRC options */
|
||||||
|
|
||||||
/* parameters for subroutines */
|
/* parameters for subroutines */
|
||||||
|
@ -882,7 +882,7 @@ void ppc_device::device_start()
|
|||||||
|
|
||||||
UINT32 flags = 0;
|
UINT32 flags = 0;
|
||||||
/* initialize the UML generator */
|
/* initialize the UML generator */
|
||||||
m_drcuml = auto_alloc(machine(), drcuml_state(*this, m_cache, flags, 8, 32, 2));
|
m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, flags, 8, 32, 2);
|
||||||
|
|
||||||
/* add symbols for our stuff */
|
/* add symbols for our stuff */
|
||||||
m_drcuml->symbol_add(&m_core->pc, sizeof(m_core->pc), "pc");
|
m_drcuml->symbol_add(&m_core->pc, sizeof(m_core->pc), "pc");
|
||||||
@ -928,7 +928,7 @@ void ppc_device::device_start()
|
|||||||
m_drcuml->symbol_add(&m_fcmp_cr_table, sizeof(m_fcmp_cr_table), "fcmp_cr_table");
|
m_drcuml->symbol_add(&m_fcmp_cr_table, sizeof(m_fcmp_cr_table), "fcmp_cr_table");
|
||||||
|
|
||||||
/* initialize the front-end helper */
|
/* initialize the front-end helper */
|
||||||
m_drcfe = auto_alloc(machine(), ppc_frontend(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE));
|
m_drcfe = std::make_unique<ppc_frontend>(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE);
|
||||||
|
|
||||||
/* compute the register parameters */
|
/* compute the register parameters */
|
||||||
for (int regnum = 0; regnum < 32; regnum++)
|
for (int regnum = 0; regnum < 32; regnum++)
|
||||||
@ -1151,10 +1151,6 @@ void ppc_device::device_stop()
|
|||||||
if (m_vtlb != nullptr)
|
if (m_vtlb != nullptr)
|
||||||
vtlb_free(m_vtlb);
|
vtlb_free(m_vtlb);
|
||||||
m_vtlb = nullptr;
|
m_vtlb = nullptr;
|
||||||
|
|
||||||
/* clean up the DRC */
|
|
||||||
auto_free(machine(), m_drcfe);
|
|
||||||
auto_free(machine(), m_drcuml);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ void ppc_device::code_compile_block(UINT8 mode, offs_t pc)
|
|||||||
/* get a description of this sequence */
|
/* get a description of this sequence */
|
||||||
desclist = m_drcfe->describe_code(pc);
|
desclist = m_drcfe->describe_code(pc);
|
||||||
if (m_drcuml->logging() || m_drcuml->logging_native())
|
if (m_drcuml->logging() || m_drcuml->logging_native())
|
||||||
log_opcode_desc(m_drcuml, desclist, 0);
|
log_opcode_desc(m_drcuml.get(), desclist, 0);
|
||||||
|
|
||||||
bool succeeded = false;
|
bool succeeded = false;
|
||||||
while (!succeeded)
|
while (!succeeded)
|
||||||
@ -641,10 +641,10 @@ void ppc_device::static_generate_entry_point()
|
|||||||
block = m_drcuml->begin_block(20);
|
block = m_drcuml->begin_block(20);
|
||||||
|
|
||||||
/* forward references */
|
/* forward references */
|
||||||
alloc_handle(m_drcuml, &m_nocode, "nocode");
|
alloc_handle(m_drcuml.get(), &m_nocode, "nocode");
|
||||||
alloc_handle(m_drcuml, &m_exception_norecover[EXCEPTION_EI], "exception_ei_norecover");
|
alloc_handle(m_drcuml.get(), &m_exception_norecover[EXCEPTION_EI], "exception_ei_norecover");
|
||||||
|
|
||||||
alloc_handle(m_drcuml, &m_entry, "entry");
|
alloc_handle(m_drcuml.get(), &m_entry, "entry");
|
||||||
UML_HANDLE(block, *m_entry); // handle entry
|
UML_HANDLE(block, *m_entry); // handle entry
|
||||||
|
|
||||||
/* reset the FPU mode */
|
/* reset the FPU mode */
|
||||||
@ -685,7 +685,7 @@ void ppc_device::static_generate_nocode_handler()
|
|||||||
block = m_drcuml->begin_block(10);
|
block = m_drcuml->begin_block(10);
|
||||||
|
|
||||||
/* generate a hash jump via the current mode and PC */
|
/* generate a hash jump via the current mode and PC */
|
||||||
alloc_handle(m_drcuml, &m_nocode, "nocode");
|
alloc_handle(m_drcuml.get(), &m_nocode, "nocode");
|
||||||
UML_HANDLE(block, *m_nocode); // handle nocode
|
UML_HANDLE(block, *m_nocode); // handle nocode
|
||||||
UML_GETEXP(block, I0); // getexp i0
|
UML_GETEXP(block, I0); // getexp i0
|
||||||
UML_MOV(block, mem(&m_core->pc), I0); // mov [pc],i0
|
UML_MOV(block, mem(&m_core->pc), I0); // mov [pc],i0
|
||||||
@ -709,7 +709,7 @@ void ppc_device::static_generate_out_of_cycles()
|
|||||||
block = m_drcuml->begin_block(10);
|
block = m_drcuml->begin_block(10);
|
||||||
|
|
||||||
/* generate a hash jump via the current mode and PC */
|
/* generate a hash jump via the current mode and PC */
|
||||||
alloc_handle(m_drcuml, &m_out_of_cycles, "out_of_cycles");
|
alloc_handle(m_drcuml.get(), &m_out_of_cycles, "out_of_cycles");
|
||||||
UML_HANDLE(block, *m_out_of_cycles); // handle out_of_cycles
|
UML_HANDLE(block, *m_out_of_cycles); // handle out_of_cycles
|
||||||
UML_GETEXP(block, I0); // getexp i0
|
UML_GETEXP(block, I0); // getexp i0
|
||||||
UML_MOV(block, mem(&m_core->pc), I0); // mov <pc>,i0
|
UML_MOV(block, mem(&m_core->pc), I0); // mov <pc>,i0
|
||||||
@ -731,15 +731,15 @@ void ppc_device::static_generate_tlb_mismatch()
|
|||||||
int isi, exit, label = 1;
|
int isi, exit, label = 1;
|
||||||
|
|
||||||
/* forward references */
|
/* forward references */
|
||||||
alloc_handle(m_drcuml, &m_exception[EXCEPTION_ISI], "exception_isi");
|
alloc_handle(m_drcuml.get(), &m_exception[EXCEPTION_ISI], "exception_isi");
|
||||||
if (m_cap & PPCCAP_603_MMU)
|
if (m_cap & PPCCAP_603_MMU)
|
||||||
alloc_handle(m_drcuml, &m_exception[EXCEPTION_ITLBMISS], "exception_itlb_miss");
|
alloc_handle(m_drcuml.get(), &m_exception[EXCEPTION_ITLBMISS], "exception_itlb_miss");
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
block = m_drcuml->begin_block(20);
|
block = m_drcuml->begin_block(20);
|
||||||
|
|
||||||
/* generate a hash jump via the current mode and PC */
|
/* generate a hash jump via the current mode and PC */
|
||||||
alloc_handle(m_drcuml, &m_tlb_mismatch, "tlb_mismatch");
|
alloc_handle(m_drcuml.get(), &m_tlb_mismatch, "tlb_mismatch");
|
||||||
UML_HANDLE(block, *m_tlb_mismatch); // handle tlb_mismatch
|
UML_HANDLE(block, *m_tlb_mismatch); // handle tlb_mismatch
|
||||||
UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC
|
UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC
|
||||||
UML_SHR(block, I1, I0, 12); // shr i1,i0,12
|
UML_SHR(block, I1, I0, 12); // shr i1,i0,12
|
||||||
@ -792,7 +792,7 @@ void ppc_device::static_generate_exception(UINT8 exception, int recover, const c
|
|||||||
block = m_drcuml->begin_block(1024);
|
block = m_drcuml->begin_block(1024);
|
||||||
|
|
||||||
/* add a global entry for this */
|
/* add a global entry for this */
|
||||||
alloc_handle(m_drcuml, &exception_handle, name);
|
alloc_handle(m_drcuml.get(), &exception_handle, name);
|
||||||
UML_HANDLE(block, *exception_handle); // handle name
|
UML_HANDLE(block, *exception_handle); // handle name
|
||||||
|
|
||||||
/* exception parameter is expected to be the fault address in this case */
|
/* exception parameter is expected to be the fault address in this case */
|
||||||
@ -981,7 +981,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite
|
|||||||
block = m_drcuml->begin_block(1024);
|
block = m_drcuml->begin_block(1024);
|
||||||
|
|
||||||
/* add a global entry for this */
|
/* add a global entry for this */
|
||||||
alloc_handle(m_drcuml, &handleptr, name);
|
alloc_handle(m_drcuml.get(), &handleptr, name);
|
||||||
UML_HANDLE(block, *handleptr); // handle *handleptr
|
UML_HANDLE(block, *handleptr); // handle *handleptr
|
||||||
|
|
||||||
/* check for unaligned accesses and break into two */
|
/* check for unaligned accesses and break into two */
|
||||||
@ -1388,7 +1388,7 @@ void ppc_device::static_generate_swap_tgpr()
|
|||||||
block = m_drcuml->begin_block(30);
|
block = m_drcuml->begin_block(30);
|
||||||
|
|
||||||
/* generate a hash jump via the current mode and PC */
|
/* generate a hash jump via the current mode and PC */
|
||||||
alloc_handle(m_drcuml, &m_swap_tgpr, "swap_tgpr");
|
alloc_handle(m_drcuml.get(), &m_swap_tgpr, "swap_tgpr");
|
||||||
UML_HANDLE(block, *m_swap_tgpr); // handle swap_tgpr
|
UML_HANDLE(block, *m_swap_tgpr); // handle swap_tgpr
|
||||||
for (regnum = 0; regnum < 4; regnum++)
|
for (regnum = 0; regnum < 4; regnum++)
|
||||||
{
|
{
|
||||||
@ -1423,7 +1423,7 @@ void ppc_device::static_generate_lsw_entries(int mode)
|
|||||||
|
|
||||||
/* allocate a handle */
|
/* allocate a handle */
|
||||||
sprintf(temp, "lsw%d", regnum);
|
sprintf(temp, "lsw%d", regnum);
|
||||||
alloc_handle(m_drcuml, &m_lsw[mode][regnum], temp);
|
alloc_handle(m_drcuml.get(), &m_lsw[mode][regnum], temp);
|
||||||
UML_HANDLE(block, *m_lsw[mode][regnum]); // handle lsw<regnum>
|
UML_HANDLE(block, *m_lsw[mode][regnum]); // handle lsw<regnum>
|
||||||
UML_LABEL(block, regnum); // regnum:
|
UML_LABEL(block, regnum); // regnum:
|
||||||
UML_ADD(block, I0, mem(&m_core->updateaddr), 0); // add i0,[updateaddr],0
|
UML_ADD(block, I0, mem(&m_core->updateaddr), 0); // add i0,[updateaddr],0
|
||||||
@ -1477,7 +1477,7 @@ void ppc_device::static_generate_stsw_entries(int mode)
|
|||||||
|
|
||||||
/* allocate a handle */
|
/* allocate a handle */
|
||||||
sprintf(temp, "stsw%d", regnum);
|
sprintf(temp, "stsw%d", regnum);
|
||||||
alloc_handle(m_drcuml, &m_stsw[mode][regnum], temp);
|
alloc_handle(m_drcuml.get(), &m_stsw[mode][regnum], temp);
|
||||||
UML_HANDLE(block, *m_stsw[mode][regnum]); // handle stsw<regnum>
|
UML_HANDLE(block, *m_stsw[mode][regnum]); // handle stsw<regnum>
|
||||||
UML_LABEL(block, regnum); // regnum:
|
UML_LABEL(block, regnum); // regnum:
|
||||||
UML_ADD(block, I0, mem(&m_core->updateaddr), 0); // add i0,[updateaddr],0
|
UML_ADD(block, I0, mem(&m_core->updateaddr), 0); // add i0,[updateaddr],0
|
||||||
|
@ -373,11 +373,11 @@ void rsp_device::device_start()
|
|||||||
|
|
||||||
if (m_isdrc)
|
if (m_isdrc)
|
||||||
{
|
{
|
||||||
m_cop2 = auto_alloc(machine(), rsp_cop2_drc(*this, machine()));
|
m_cop2 = std::make_unique<rsp_cop2_drc>(*this, machine());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_cop2 = auto_alloc(machine(), rsp_cop2(*this, machine()));
|
m_cop2 = std::make_unique<rsp_cop2>(*this, machine());
|
||||||
}
|
}
|
||||||
m_cop2->init();
|
m_cop2->init();
|
||||||
m_cop2->start();
|
m_cop2->start();
|
||||||
@ -393,7 +393,7 @@ void rsp_device::device_start()
|
|||||||
|
|
||||||
/* initialize the UML generator */
|
/* initialize the UML generator */
|
||||||
UINT32 drc_flags = 0;
|
UINT32 drc_flags = 0;
|
||||||
m_drcuml = auto_alloc(machine(), drcuml_state(*this, m_cache, drc_flags, 8, 32, 2));
|
m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, drc_flags, 8, 32, 2);
|
||||||
|
|
||||||
/* add symbols for our stuff */
|
/* add symbols for our stuff */
|
||||||
m_drcuml->symbol_add(&m_rsp_state->pc, sizeof(m_rsp_state->pc), "pc");
|
m_drcuml->symbol_add(&m_rsp_state->pc, sizeof(m_rsp_state->pc), "pc");
|
||||||
@ -411,7 +411,7 @@ void rsp_device::device_start()
|
|||||||
m_drcuml->symbol_add(&m_numcycles, sizeof(m_numcycles), "numcycles");
|
m_drcuml->symbol_add(&m_numcycles, sizeof(m_numcycles), "numcycles");
|
||||||
|
|
||||||
/* initialize the front-end helper */
|
/* initialize the front-end helper */
|
||||||
m_drcfe = auto_alloc(machine(), rsp_frontend(*this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE));
|
m_drcfe = std::make_unique<rsp_frontend>(*this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE);
|
||||||
|
|
||||||
/* compute the register parameters */
|
/* compute the register parameters */
|
||||||
for (int regnum = 0; regnum < 32; regnum++)
|
for (int regnum = 0; regnum < 32; regnum++)
|
||||||
@ -596,21 +596,6 @@ void rsp_device::device_stop()
|
|||||||
if (m_exec_output)
|
if (m_exec_output)
|
||||||
fclose(m_exec_output);
|
fclose(m_exec_output);
|
||||||
m_exec_output = nullptr;
|
m_exec_output = nullptr;
|
||||||
|
|
||||||
/* clean up the DRC */
|
|
||||||
if (m_drcuml)
|
|
||||||
{
|
|
||||||
auto_free(machine(), m_drcuml);
|
|
||||||
}
|
|
||||||
if (m_drcfe)
|
|
||||||
{
|
|
||||||
auto_free(machine(), m_drcfe);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_cop2)
|
|
||||||
{
|
|
||||||
auto_free(machine(), m_cop2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rsp_device::device_reset()
|
void rsp_device::device_reset()
|
||||||
|
@ -217,8 +217,8 @@ private:
|
|||||||
|
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache m_cache; /* pointer to the DRC code cache */
|
drc_cache m_cache; /* pointer to the DRC code cache */
|
||||||
drcuml_state * m_drcuml; /* DRC UML generator state */
|
std::unique_ptr<drcuml_state> m_drcuml; /* DRC UML generator state */
|
||||||
rsp_frontend * m_drcfe; /* pointer to the DRC front-end state */
|
std::unique_ptr<rsp_frontend> m_drcfe; /* pointer to the DRC front-end state */
|
||||||
UINT32 m_drcoptions; /* configurable DRC options */
|
UINT32 m_drcoptions; /* configurable DRC options */
|
||||||
|
|
||||||
/* internal stuff */
|
/* internal stuff */
|
||||||
@ -269,7 +269,7 @@ protected:
|
|||||||
direct_read_data *m_direct;
|
direct_read_data *m_direct;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rsp_cop2 *m_cop2;
|
std::unique_ptr<rsp_cop2> m_cop2;
|
||||||
|
|
||||||
UINT32 *m_dmem32;
|
UINT32 *m_dmem32;
|
||||||
UINT16 *m_dmem16;
|
UINT16 *m_dmem16;
|
||||||
|
@ -78,9 +78,10 @@ class rsp_cop2
|
|||||||
{
|
{
|
||||||
friend class rsp_device;
|
friend class rsp_device;
|
||||||
|
|
||||||
protected:
|
public:
|
||||||
rsp_cop2(rsp_device &rsp, running_machine &machine);
|
rsp_cop2(rsp_device &rsp, running_machine &machine);
|
||||||
|
|
||||||
|
protected:
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void start();
|
virtual void start();
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
class rsp_cop2_drc : public rsp_cop2
|
class rsp_cop2_drc : public rsp_cop2
|
||||||
{
|
{
|
||||||
friend class rsp_device;
|
friend class rsp_device;
|
||||||
|
public:
|
||||||
rsp_cop2_drc(rsp_device &rsp, running_machine &machine) : rsp_cop2(rsp, machine) { }
|
rsp_cop2_drc(rsp_device &rsp, running_machine &machine) : rsp_cop2(rsp, machine) { }
|
||||||
|
private:
|
||||||
virtual int generate_cop2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
virtual int generate_cop2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
||||||
virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
||||||
virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
|
||||||
|
@ -260,7 +260,7 @@ void cfunc_sp_set_status_cb(void *param)
|
|||||||
|
|
||||||
void rsp_device::execute_run_drc()
|
void rsp_device::execute_run_drc()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
int execute_result;
|
int execute_result;
|
||||||
|
|
||||||
/* reset the cache if dirty */
|
/* reset the cache if dirty */
|
||||||
@ -350,7 +350,7 @@ void rsp_device::code_flush_cache()
|
|||||||
|
|
||||||
void rsp_device::code_compile_block(offs_t pc)
|
void rsp_device::code_compile_block(offs_t pc)
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
compiler_state compiler = { 0 };
|
compiler_state compiler = { 0 };
|
||||||
const opcode_desc *seqhead, *seqlast;
|
const opcode_desc *seqhead, *seqlast;
|
||||||
const opcode_desc *desclist;
|
const opcode_desc *desclist;
|
||||||
@ -490,7 +490,7 @@ static void cfunc_fatalerror(void *param)
|
|||||||
|
|
||||||
void rsp_device::static_generate_entry_point()
|
void rsp_device::static_generate_entry_point()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -518,7 +518,7 @@ void rsp_device::static_generate_entry_point()
|
|||||||
|
|
||||||
void rsp_device::static_generate_nocode_handler()
|
void rsp_device::static_generate_nocode_handler()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -543,7 +543,7 @@ void rsp_device::static_generate_nocode_handler()
|
|||||||
|
|
||||||
void rsp_device::static_generate_out_of_cycles()
|
void rsp_device::static_generate_out_of_cycles()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -569,7 +569,7 @@ void rsp_device::static_generate_memory_accessor(int size, int iswrite, const ch
|
|||||||
/* on entry, address is in I0; data for writes is in I1 */
|
/* on entry, address is in I0; data for writes is in I1 */
|
||||||
/* on exit, read result is in I0 */
|
/* on exit, read result is in I0 */
|
||||||
/* routine trashes I0-I1 */
|
/* routine trashes I0-I1 */
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
|
@ -199,11 +199,6 @@ sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t
|
|||||||
|
|
||||||
void sh2_device::device_stop()
|
void sh2_device::device_stop()
|
||||||
{
|
{
|
||||||
/* clean up the DRC */
|
|
||||||
if ( m_drcuml )
|
|
||||||
{
|
|
||||||
auto_free(machine(), m_drcuml);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2536,7 +2531,7 @@ void sh2_device::device_start()
|
|||||||
|
|
||||||
/* initialize the UML generator */
|
/* initialize the UML generator */
|
||||||
UINT32 flags = 0;
|
UINT32 flags = 0;
|
||||||
m_drcuml = auto_alloc(machine(), drcuml_state(*this, m_cache, flags, 1, 32, 1));
|
m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, flags, 1, 32, 1);
|
||||||
|
|
||||||
/* add symbols for our stuff */
|
/* add symbols for our stuff */
|
||||||
m_drcuml->symbol_add(&m_sh2_state->pc, sizeof(m_sh2_state->pc), "pc");
|
m_drcuml->symbol_add(&m_sh2_state->pc, sizeof(m_sh2_state->pc), "pc");
|
||||||
@ -2555,7 +2550,7 @@ void sh2_device::device_start()
|
|||||||
m_drcuml->symbol_add(&m_sh2_state->mach, sizeof(m_sh2_state->macl), "mach");
|
m_drcuml->symbol_add(&m_sh2_state->mach, sizeof(m_sh2_state->macl), "mach");
|
||||||
|
|
||||||
/* initialize the front-end helper */
|
/* initialize the front-end helper */
|
||||||
m_drcfe = auto_alloc(machine(), sh2_frontend(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE));
|
m_drcfe = std::make_unique<sh2_frontend>(this, COMPILE_BACKWARDS_BYTES, COMPILE_FORWARDS_BYTES, SINGLE_INSTRUCTION_MODE ? 1 : COMPILE_MAX_SEQUENCE);
|
||||||
|
|
||||||
/* compute the register parameters */
|
/* compute the register parameters */
|
||||||
for (int regnum = 0; regnum < 16; regnum++)
|
for (int regnum = 0; regnum < 16; regnum++)
|
||||||
|
@ -219,8 +219,8 @@ private:
|
|||||||
sh2_ftcsr_read_delegate m_ftcsr_read_cb;
|
sh2_ftcsr_read_delegate m_ftcsr_read_cb;
|
||||||
|
|
||||||
drc_cache m_cache; /* pointer to the DRC code cache */
|
drc_cache m_cache; /* pointer to the DRC code cache */
|
||||||
drcuml_state * m_drcuml; /* DRC UML generator state */
|
std::unique_ptr<drcuml_state> m_drcuml; /* DRC UML generator state */
|
||||||
sh2_frontend * m_drcfe; /* pointer to the DRC front-end state */
|
std::unique_ptr<sh2_frontend> m_drcfe; /* pointer to the DRC front-end state */
|
||||||
UINT32 m_drcoptions; /* configurable DRC options */
|
UINT32 m_drcoptions; /* configurable DRC options */
|
||||||
|
|
||||||
internal_sh2_state *m_sh2_state;
|
internal_sh2_state *m_sh2_state;
|
||||||
|
@ -586,7 +586,7 @@ void sh2_device::func_SUBV() {}
|
|||||||
|
|
||||||
void sh2_device::code_flush_cache()
|
void sh2_device::code_flush_cache()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
|
|
||||||
/* empty the transient cache contents */
|
/* empty the transient cache contents */
|
||||||
drcuml->reset();
|
drcuml->reset();
|
||||||
@ -617,7 +617,7 @@ void sh2_device::code_flush_cache()
|
|||||||
/* Execute cycles - returns number of cycles actually run */
|
/* Execute cycles - returns number of cycles actually run */
|
||||||
void sh2_device::execute_run_drc()
|
void sh2_device::execute_run_drc()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
int execute_result;
|
int execute_result;
|
||||||
|
|
||||||
// run any active DMAs now
|
// run any active DMAs now
|
||||||
@ -665,7 +665,7 @@ void sh2_device::execute_run_drc()
|
|||||||
|
|
||||||
void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
|
void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
compiler_state compiler = { 0 };
|
compiler_state compiler = { 0 };
|
||||||
const opcode_desc *seqhead, *seqlast;
|
const opcode_desc *seqhead, *seqlast;
|
||||||
const opcode_desc *desclist;
|
const opcode_desc *desclist;
|
||||||
@ -781,7 +781,7 @@ void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
|
|||||||
|
|
||||||
void sh2_device::static_generate_entry_point()
|
void sh2_device::static_generate_entry_point()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
code_label skip = 1;
|
code_label skip = 1;
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
@ -861,7 +861,7 @@ void sh2_device::static_generate_entry_point()
|
|||||||
|
|
||||||
void sh2_device::static_generate_nocode_handler()
|
void sh2_device::static_generate_nocode_handler()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -886,7 +886,7 @@ void sh2_device::static_generate_nocode_handler()
|
|||||||
|
|
||||||
void sh2_device::static_generate_out_of_cycles()
|
void sh2_device::static_generate_out_of_cycles()
|
||||||
{
|
{
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
|
|
||||||
/* begin generating */
|
/* begin generating */
|
||||||
@ -912,7 +912,7 @@ void sh2_device::static_generate_memory_accessor(int size, int iswrite, const ch
|
|||||||
/* on entry, address is in I0; data for writes is in I1 */
|
/* on entry, address is in I0; data for writes is in I1 */
|
||||||
/* on exit, read result is in I0 */
|
/* on exit, read result is in I0 */
|
||||||
/* routine trashes I0 */
|
/* routine trashes I0 */
|
||||||
drcuml_state *drcuml = m_drcuml;
|
drcuml_state *drcuml = m_drcuml.get();
|
||||||
drcuml_block *block;
|
drcuml_block *block;
|
||||||
int label = 1;
|
int label = 1;
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ void ymf271_device::update_lfo(YMF271Slot *slot)
|
|||||||
slot->lfo_phase += slot->lfo_step;
|
slot->lfo_phase += slot->lfo_step;
|
||||||
|
|
||||||
slot->lfo_amplitude = m_lut_alfo[slot->lfowave][(slot->lfo_phase >> LFO_SHIFT) & (LFO_LENGTH-1)];
|
slot->lfo_amplitude = m_lut_alfo[slot->lfowave][(slot->lfo_phase >> LFO_SHIFT) & (LFO_LENGTH-1)];
|
||||||
slot->lfo_phasemod = m_lut_plfo[slot->lfowave][slot->pms][(slot->lfo_phase >> LFO_SHIFT) & (LFO_LENGTH-1)];
|
slot->lfo_phasemod = m_lut_plfo[slot->lfowave][slot->pms].get()[(slot->lfo_phase >> LFO_SHIFT) & (LFO_LENGTH-1)];
|
||||||
|
|
||||||
calculate_step(slot);
|
calculate_step(slot);
|
||||||
}
|
}
|
||||||
@ -1508,7 +1508,7 @@ void ymf271_device::init_tables()
|
|||||||
m_lut_waves[i] = std::make_unique<INT16[]>(SIN_LEN);
|
m_lut_waves[i] = std::make_unique<INT16[]>(SIN_LEN);
|
||||||
|
|
||||||
for (i = 0; i < 4*8; i++)
|
for (i = 0; i < 4*8; i++)
|
||||||
m_lut_plfo[i>>3][i&7] = auto_alloc_array(machine(), double, LFO_LENGTH);
|
m_lut_plfo[i>>3][i&7] = std::make_unique<double[]>(LFO_LENGTH);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
m_lut_alfo[i] = std::make_unique<int[]>(LFO_LENGTH);
|
m_lut_alfo[i] = std::make_unique<int[]>(LFO_LENGTH);
|
||||||
@ -1568,14 +1568,14 @@ void ymf271_device::init_tables()
|
|||||||
|
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
m_lut_plfo[j][0][i] = pow(2.0, 0.0);
|
m_lut_plfo[j][0].get()[i] = pow(2.0, 0.0);
|
||||||
m_lut_plfo[j][1][i] = pow(2.0, (3.378 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][1].get()[i] = pow(2.0, (3.378 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][2][i] = pow(2.0, (5.0646 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][2].get()[i] = pow(2.0, (5.0646 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][3][i] = pow(2.0, (6.7495 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][3].get()[i] = pow(2.0, (6.7495 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][4][i] = pow(2.0, (10.1143 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][4].get()[i] = pow(2.0, (10.1143 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][5][i] = pow(2.0, (20.1699 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][5].get()[i] = pow(2.0, (20.1699 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][6][i] = pow(2.0, (40.1076 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][6].get()[i] = pow(2.0, (40.1076 * plfo[j]) / 1200.0);
|
||||||
m_lut_plfo[j][7][i] = pow(2.0, (79.307 * plfo[j]) / 1200.0);
|
m_lut_plfo[j][7].get()[i] = pow(2.0, (79.307 * plfo[j]) / 1200.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LFO amplitude modulation
|
// LFO amplitude modulation
|
||||||
|
@ -122,7 +122,7 @@ private:
|
|||||||
|
|
||||||
// lookup tables
|
// lookup tables
|
||||||
std::unique_ptr<INT16[]> m_lut_waves[8];
|
std::unique_ptr<INT16[]> m_lut_waves[8];
|
||||||
double *m_lut_plfo[4][8];
|
std::unique_ptr<double[]> m_lut_plfo[4][8];
|
||||||
std::unique_ptr<int[]> m_lut_alfo[4];
|
std::unique_ptr<int[]> m_lut_alfo[4];
|
||||||
double m_lut_ar[64];
|
double m_lut_ar[64];
|
||||||
double m_lut_dc[64];
|
double m_lut_dc[64];
|
||||||
|
@ -2125,7 +2125,7 @@ int saturn_state::stv_vdp1_start ( void )
|
|||||||
m_vdp1_vram = make_unique_clear<UINT32[]>(0x100000/4 );
|
m_vdp1_vram = make_unique_clear<UINT32[]>(0x100000/4 );
|
||||||
m_vdp1.gfx_decode = std::make_unique<UINT8[]>(0x100000 );
|
m_vdp1.gfx_decode = std::make_unique<UINT8[]>(0x100000 );
|
||||||
|
|
||||||
stv_vdp1_shading_data = auto_alloc(machine(), struct stv_vdp1_poly_scanline_data);
|
stv_vdp1_shading_data = std::make_unique<struct stv_vdp1_poly_scanline_data>();
|
||||||
|
|
||||||
m_vdp1.framebuffer[0] = std::make_unique<UINT16[]>(1024 * 256 * 2 ); /* *2 is for double interlace */
|
m_vdp1.framebuffer[0] = std::make_unique<UINT16[]>(1024 * 256 * 2 ); /* *2 is for double interlace */
|
||||||
m_vdp1.framebuffer[1] = std::make_unique<UINT16[]>(1024 * 256 * 2 );
|
m_vdp1.framebuffer[1] = std::make_unique<UINT16[]>(1024 * 256 * 2 );
|
||||||
|
@ -1690,8 +1690,6 @@ device_debug::device_debug(device_t &device)
|
|||||||
|
|
||||||
device_debug::~device_debug()
|
device_debug::~device_debug()
|
||||||
{
|
{
|
||||||
auto_free(m_device.machine(), m_trace);
|
|
||||||
|
|
||||||
// free breakpoints and watchpoints
|
// free breakpoints and watchpoints
|
||||||
breakpoint_clear_all();
|
breakpoint_clear_all();
|
||||||
watchpoint_clear_all();
|
watchpoint_clear_all();
|
||||||
@ -2759,12 +2757,11 @@ UINT32 device_debug::compute_opcode_crc32(offs_t pc) const
|
|||||||
void device_debug::trace(FILE *file, bool trace_over, const char *action)
|
void device_debug::trace(FILE *file, bool trace_over, const char *action)
|
||||||
{
|
{
|
||||||
// delete any existing tracers
|
// delete any existing tracers
|
||||||
auto_free(m_device.machine(), m_trace);
|
|
||||||
m_trace = nullptr;
|
m_trace = nullptr;
|
||||||
|
|
||||||
// if we have a new file, make a new tracer
|
// if we have a new file, make a new tracer
|
||||||
if (file != nullptr)
|
if (file != nullptr)
|
||||||
m_trace = auto_alloc(m_device.machine(), tracer(*this, *file, trace_over, action));
|
m_trace = std::make_unique<tracer>(*this, *file, trace_over, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ private:
|
|||||||
// (0 = not tracing over,
|
// (0 = not tracing over,
|
||||||
// ~0 = not currently tracing over)
|
// ~0 = not currently tracing over)
|
||||||
};
|
};
|
||||||
tracer * m_trace; // tracer state
|
std::unique_ptr<tracer> m_trace; // tracer state
|
||||||
|
|
||||||
// hotspots
|
// hotspots
|
||||||
struct hotspot_entry
|
struct hotspot_entry
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
required_device<cquestsnd_cpu_device> m_soundcpu;
|
required_device<cquestsnd_cpu_device> m_soundcpu;
|
||||||
required_device<screen_device> m_screen;
|
required_device<screen_device> m_screen;
|
||||||
required_shared_ptr<UINT16> m_generic_paletteram_16;
|
required_shared_ptr<UINT16> m_generic_paletteram_16;
|
||||||
rgb_t *m_colormap;
|
std::unique_ptr<rgb_t[]> m_colormap;
|
||||||
DECLARE_WRITE16_MEMBER(palette_w);
|
DECLARE_WRITE16_MEMBER(palette_w);
|
||||||
DECLARE_READ16_MEMBER(line_r);
|
DECLARE_READ16_MEMBER(line_r);
|
||||||
DECLARE_WRITE16_MEMBER(laserdisc_w);
|
DECLARE_WRITE16_MEMBER(laserdisc_w);
|
||||||
@ -444,7 +444,7 @@ void cubeqst_state::machine_start()
|
|||||||
/* TODO: Use resistor values */
|
/* TODO: Use resistor values */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
m_colormap = auto_alloc_array(machine(), rgb_t, 65536);
|
m_colormap = std::make_unique<rgb_t[]>(65536);
|
||||||
for (i = 0; i < 65536; ++i)
|
for (i = 0; i < 65536; ++i)
|
||||||
{
|
{
|
||||||
UINT8 a, r, g, b, y;
|
UINT8 a, r, g, b, y;
|
||||||
|
@ -247,7 +247,7 @@ void igs017_state::decrypt_program_rom(int mask, int a7, int a6, int a5, int a4,
|
|||||||
{
|
{
|
||||||
int length = memregion("maincpu")->bytes();
|
int length = memregion("maincpu")->bytes();
|
||||||
UINT8 *rom = memregion("maincpu")->base();
|
UINT8 *rom = memregion("maincpu")->base();
|
||||||
UINT8 *tmp = auto_alloc_array(machine(), UINT8, length);
|
std::unique_ptr<UINT8[]> tmp = std::make_unique<UINT8[]>(length);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// decrypt the program ROM
|
// decrypt the program ROM
|
||||||
@ -283,7 +283,7 @@ void igs017_state::decrypt_program_rom(int mask, int a7, int a6, int a5, int a4,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(tmp,rom,length);
|
memcpy(tmp.get(),rom,length);
|
||||||
|
|
||||||
// address lines swap
|
// address lines swap
|
||||||
for (i = 0;i < length;i++)
|
for (i = 0;i < length;i++)
|
||||||
@ -347,11 +347,11 @@ void igs017_state::tjsb_decrypt_sprites()
|
|||||||
{
|
{
|
||||||
int length = memregion("sprites")->bytes();
|
int length = memregion("sprites")->bytes();
|
||||||
UINT8 *rom = memregion("sprites")->base();
|
UINT8 *rom = memregion("sprites")->base();
|
||||||
UINT8 *tmp = auto_alloc_array(machine(), UINT8, length);
|
std::unique_ptr<UINT8[]> tmp = std::make_unique<UINT8[]>(length);
|
||||||
int i, addr;
|
int i, addr;
|
||||||
|
|
||||||
// address lines swap
|
// address lines swap
|
||||||
memcpy(tmp, rom, length);
|
memcpy(tmp.get(), rom, length);
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
addr = (i & ~0xff) | BITSWAP8(i,7,6,5,2,1,4,3,0);
|
addr = (i & ~0xff) | BITSWAP8(i,7,6,5,2,1,4,3,0);
|
||||||
@ -739,11 +739,11 @@ void igs017_state::lhzb2_decrypt_sprites()
|
|||||||
{
|
{
|
||||||
int length = memregion("sprites")->bytes();
|
int length = memregion("sprites")->bytes();
|
||||||
UINT8 *rom = memregion("sprites")->base();
|
UINT8 *rom = memregion("sprites")->base();
|
||||||
UINT8 *tmp = auto_alloc_array(machine(), UINT8, length);
|
std::unique_ptr<UINT8[]> tmp = std::make_unique<UINT8[]>(length);
|
||||||
int i, addr;
|
int i, addr;
|
||||||
|
|
||||||
// address lines swap
|
// address lines swap
|
||||||
memcpy(tmp, rom, length);
|
memcpy(tmp.get(), rom, length);
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
addr = (i & ~0xffff) | BITSWAP16(i,15,14,13,6,7,10,9,8,11,12,5,4,3,2,1,0);
|
addr = (i & ~0xffff) | BITSWAP16(i,15,14,13,6,7,10,9,8,11,12,5,4,3,2,1,0);
|
||||||
@ -1053,11 +1053,11 @@ void igs017_state::spkrform_decrypt_sprites()
|
|||||||
{
|
{
|
||||||
int length = memregion("sprites")->bytes();
|
int length = memregion("sprites")->bytes();
|
||||||
UINT8 *rom = memregion("sprites")->base();
|
UINT8 *rom = memregion("sprites")->base();
|
||||||
UINT8 *tmp = auto_alloc_array(machine(), UINT8, length);
|
std::unique_ptr<UINT8[]> tmp = std::make_unique<UINT8[]>(length);
|
||||||
int i, addr;
|
int i, addr;
|
||||||
|
|
||||||
// address lines swap
|
// address lines swap
|
||||||
memcpy(tmp, rom, length);
|
memcpy(tmp.get(), rom, length);
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
if (i & 0x80000)
|
if (i & 0x80000)
|
||||||
|
@ -811,7 +811,7 @@ int namcos21_state::init_dsp()
|
|||||||
pMem[0x8000] = 0xFF80;
|
pMem[0x8000] = 0xFF80;
|
||||||
pMem[0x8001] = 0x0000;
|
pMem[0x8001] = 0x0000;
|
||||||
|
|
||||||
m_mpDspState = auto_alloc_clear(machine(), dsp_state);
|
m_mpDspState = make_unique_clear<dsp_state>();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1384,7 +1384,7 @@ struct c404_t
|
|||||||
|
|
||||||
struct render_t
|
struct render_t
|
||||||
{
|
{
|
||||||
namcos23_renderer *polymgr;
|
std::unique_ptr<namcos23_renderer> polymgr;
|
||||||
int cur;
|
int cur;
|
||||||
int poly_count;
|
int poly_count;
|
||||||
int count[2];
|
int count[2];
|
||||||
@ -2380,7 +2380,7 @@ VIDEO_START_MEMBER(namcos23_state,s23)
|
|||||||
m_bgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(namcos23_state::TextTilemapGetInfo),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
|
m_bgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(namcos23_state::TextTilemapGetInfo),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
|
||||||
m_bgtilemap->set_transparent_pen(0xf);
|
m_bgtilemap->set_transparent_pen(0xf);
|
||||||
m_bgtilemap->set_scrolldx(860, 860);
|
m_bgtilemap->set_scrolldx(860, 860);
|
||||||
m_render.polymgr = auto_alloc(machine(), namcos23_renderer(*this));
|
m_render.polymgr = std::make_unique<namcos23_renderer>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
m_uart(*this, "ns16450_0"),
|
m_uart(*this, "ns16450_0"),
|
||||||
m_microtouch(*this, "microtouch") { }
|
m_microtouch(*this, "microtouch") { }
|
||||||
|
|
||||||
UINT8 *m_banked_nvram;
|
std::unique_ptr<UINT8[]> m_banked_nvram;
|
||||||
required_device<ns16450_device> m_uart;
|
required_device<ns16450_device> m_uart;
|
||||||
required_device<microtouch_device> m_microtouch;
|
required_device<microtouch_device> m_microtouch;
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ WRITE8_MEMBER(pcat_nit_state::pcat_nit_rombank_w)
|
|||||||
|
|
||||||
space.install_readwrite_bank(0x000d8000, 0x000d9fff, "nvrambank" );
|
space.install_readwrite_bank(0x000d8000, 0x000d9fff, "nvrambank" );
|
||||||
|
|
||||||
membank("nvrambank")->set_base(m_banked_nvram);
|
membank("nvrambank")->set_base(m_banked_nvram.get());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,8 +413,8 @@ ROM_END
|
|||||||
|
|
||||||
DRIVER_INIT_MEMBER(pcat_nit_state,pcat_nit)
|
DRIVER_INIT_MEMBER(pcat_nit_state,pcat_nit)
|
||||||
{
|
{
|
||||||
m_banked_nvram = auto_alloc_array(machine(), UINT8, 0x2000);
|
m_banked_nvram = std::make_unique<UINT8[]>(0x2000);
|
||||||
machine().device<nvram_device>("nvram")->set_base(m_banked_nvram, 0x2000);
|
machine().device<nvram_device>("nvram")->set_base(m_banked_nvram.get(), 0x2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
GAME( 1993, streetg, 0, pcat_nit, pcat_nit, pcat_nit_state, pcat_nit, ROT0, "New Image Technologies", "Street Games (Revision 4)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND )
|
GAME( 1993, streetg, 0, pcat_nit, pcat_nit, pcat_nit_state, pcat_nit, ROT0, "New Image Technologies", "Street Games (Revision 4)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND )
|
||||||
|
@ -302,7 +302,7 @@ public:
|
|||||||
DECLARE_WRITE32_MEMBER(cmd_callback);
|
DECLARE_WRITE32_MEMBER(cmd_callback);
|
||||||
|
|
||||||
std::unique_ptr<UINT8[]> m_texture;
|
std::unique_ptr<UINT8[]> m_texture;
|
||||||
rollext_renderer* m_renderer;
|
std::unique_ptr<rollext_renderer> m_renderer;
|
||||||
|
|
||||||
INTERRUPT_GEN_MEMBER(vblank_interrupt);
|
INTERRUPT_GEN_MEMBER(vblank_interrupt);
|
||||||
DECLARE_DRIVER_INIT(rollext);
|
DECLARE_DRIVER_INIT(rollext);
|
||||||
@ -339,7 +339,7 @@ void rollext_state::video_start()
|
|||||||
|
|
||||||
preprocess_texture_data();
|
preprocess_texture_data();
|
||||||
|
|
||||||
m_renderer = auto_alloc(machine(), rollext_renderer(*m_screen));
|
m_renderer = std::make_unique<rollext_renderer>(*m_screen);
|
||||||
m_renderer->set_texture_ram(m_texture.get());
|
m_renderer->set_texture_ram(m_texture.get());
|
||||||
m_renderer->set_palette_ram((UINT16*)&m_palette_ram[0]);
|
m_renderer->set_palette_ram((UINT16*)&m_palette_ram[0]);
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public:
|
|||||||
UINT8 m_dsw_select;
|
UINT8 m_dsw_select;
|
||||||
UINT8 m_rombank;
|
UINT8 m_rombank;
|
||||||
int m_palette_base;
|
int m_palette_base;
|
||||||
UINT8 *m_janptr96_nvram;
|
std::unique_ptr<UINT8[]> m_janptr96_nvram;
|
||||||
UINT8 m_suzume_bank;
|
UINT8 m_suzume_bank;
|
||||||
UINT8 m_gfx_adr_l;
|
UINT8 m_gfx_adr_l;
|
||||||
UINT8 m_gfx_adr_m;
|
UINT8 m_gfx_adr_m;
|
||||||
@ -883,7 +883,7 @@ WRITE8_MEMBER(royalmah_state::janptr96_rombank_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(royalmah_state::janptr96_rambank_w)
|
WRITE8_MEMBER(royalmah_state::janptr96_rambank_w)
|
||||||
{
|
{
|
||||||
membank("bank2")->set_base(m_janptr96_nvram + 0x1000 + 0x1000 * data);
|
membank("bank2")->set_base(m_janptr96_nvram.get() + 0x1000 + 0x1000 * data);
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_MEMBER(royalmah_state::janptr96_unknown_r)
|
READ8_MEMBER(royalmah_state::janptr96_unknown_r)
|
||||||
@ -4901,9 +4901,9 @@ DRIVER_INIT_MEMBER(royalmah_state,ippatsu)
|
|||||||
|
|
||||||
DRIVER_INIT_MEMBER(royalmah_state,janptr96)
|
DRIVER_INIT_MEMBER(royalmah_state,janptr96)
|
||||||
{
|
{
|
||||||
m_janptr96_nvram = auto_alloc_array(machine(), UINT8, 0x1000 * 9);
|
m_janptr96_nvram = std::make_unique<UINT8[]>(0x1000 * 9);
|
||||||
membank("bank3")->set_base(m_janptr96_nvram);
|
membank("bank3")->set_base(m_janptr96_nvram.get());
|
||||||
machine().device<nvram_device>("nvram")->set_base(m_janptr96_nvram, 0x1000 * 9);
|
machine().device<nvram_device>("nvram")->set_base(m_janptr96_nvram.get(), 0x1000 * 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
GAME( 1981, royalmj, 0, royalmah, royalmah, driver_device, 0, ROT0, "Nichibutsu", "Royal Mahjong (Japan, v1.13)", 0 )
|
GAME( 1981, royalmj, 0, royalmah, royalmah, driver_device, 0, ROT0, "Nichibutsu", "Royal Mahjong (Japan, v1.13)", 0 )
|
||||||
|
@ -145,8 +145,8 @@ public:
|
|||||||
UINT16 m_dsp_ram[0x1000];
|
UINT16 m_dsp_ram[0x1000];
|
||||||
UINT16 m_io_share_ram[0x2000];
|
UINT16 m_io_share_ram[0x2000];
|
||||||
|
|
||||||
UINT32 *m_screen_ram;
|
std::unique_ptr<UINT32[]> m_screen_ram;
|
||||||
UINT32 *m_pal_ram;
|
std::unique_ptr<UINT32[]> m_pal_ram;
|
||||||
|
|
||||||
UINT32 m_video_address;
|
UINT32 m_video_address;
|
||||||
|
|
||||||
@ -183,15 +183,15 @@ void taitopjc_state::video_exit()
|
|||||||
|
|
||||||
void taitopjc_state::video_start()
|
void taitopjc_state::video_start()
|
||||||
{
|
{
|
||||||
m_screen_ram = auto_alloc_array(machine(), UINT32, 0x40000);
|
m_screen_ram = std::make_unique<UINT32[]>(0x40000);
|
||||||
m_pal_ram = auto_alloc_array(machine(), UINT32, 0x8000);
|
m_pal_ram = std::make_unique<UINT32[]>(0x8000);
|
||||||
|
|
||||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitopjc_state::video_exit), this));
|
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitopjc_state::video_exit), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 taitopjc_state::screen_update_taitopjc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
UINT32 taitopjc_state::screen_update_taitopjc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
UINT8 *s = (UINT8*)m_screen_ram;
|
UINT8 *s = (UINT8*)m_screen_ram.get();
|
||||||
int x,y,t,u;
|
int x,y,t,u;
|
||||||
|
|
||||||
bitmap.fill(0x000000, cliprect);
|
bitmap.fill(0x000000, cliprect);
|
||||||
|
@ -593,7 +593,7 @@ public:
|
|||||||
UINT32 m_displist_addr;
|
UINT32 m_displist_addr;
|
||||||
int m_count;
|
int m_count;
|
||||||
|
|
||||||
taitotz_renderer *m_renderer;
|
std::unique_ptr<taitotz_renderer> m_renderer;
|
||||||
DECLARE_DRIVER_INIT(batlgr2a);
|
DECLARE_DRIVER_INIT(batlgr2a);
|
||||||
DECLARE_DRIVER_INIT(batlgr2);
|
DECLARE_DRIVER_INIT(batlgr2);
|
||||||
DECLARE_DRIVER_INIT(pwrshovl);
|
DECLARE_DRIVER_INIT(pwrshovl);
|
||||||
@ -747,7 +747,7 @@ void taitotz_state::video_start()
|
|||||||
m_texture_ram = std::make_unique<UINT32[]>(0x800000);
|
m_texture_ram = std::make_unique<UINT32[]>(0x800000);
|
||||||
|
|
||||||
/* create renderer */
|
/* create renderer */
|
||||||
m_renderer = auto_alloc(machine(), taitotz_renderer(*this, width, height, m_texture_ram.get()));
|
m_renderer = std::make_unique<taitotz_renderer>(*this, width, height, m_texture_ram.get());
|
||||||
|
|
||||||
//machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitotz_exit), &machine()));
|
//machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitotz_exit), &machine()));
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ public:
|
|||||||
double m_joystick_x2_time;
|
double m_joystick_x2_time;
|
||||||
double m_joystick_y2_time;
|
double m_joystick_y2_time;
|
||||||
apple2_memmap_config m_mem_config;
|
apple2_memmap_config m_mem_config;
|
||||||
apple2_meminfo *m_current_meminfo;
|
std::unique_ptr<apple2_meminfo[]> m_current_meminfo;
|
||||||
int m_fdc_diskreg;
|
int m_fdc_diskreg;
|
||||||
const UINT8 *m_a2_videoram, *m_a2_videoaux, *m_textgfx_data;
|
const UINT8 *m_a2_videoram, *m_a2_videoaux, *m_textgfx_data;
|
||||||
UINT32 m_a2_videomask, m_textgfx_datalen;
|
UINT32 m_a2_videomask, m_textgfx_datalen;
|
||||||
|
@ -96,12 +96,12 @@ public:
|
|||||||
offs_t m_adsp_incs;
|
offs_t m_adsp_incs;
|
||||||
offs_t m_adsp_size;
|
offs_t m_adsp_size;
|
||||||
dmadac_sound_device *m_dmadac[SOUND_CHANNELS];
|
dmadac_sound_device *m_dmadac[SOUND_CHANNELS];
|
||||||
rgb_t *m_palette;
|
std::unique_ptr<rgb_t[]> m_palette;
|
||||||
std::unique_ptr<UINT32[]> m_polydata_buffer;
|
std::unique_ptr<UINT32[]> m_polydata_buffer;
|
||||||
UINT32 m_polydata_count;
|
UINT32 m_polydata_count;
|
||||||
int m_lastscan;
|
int m_lastscan;
|
||||||
int m_video_changed;
|
int m_video_changed;
|
||||||
gaelco3d_renderer *m_poly;
|
std::unique_ptr<gaelco3d_renderer> m_poly;
|
||||||
DECLARE_WRITE16_MEMBER(irq_ack_w);
|
DECLARE_WRITE16_MEMBER(irq_ack_w);
|
||||||
DECLARE_WRITE32_MEMBER(irq_ack32_w);
|
DECLARE_WRITE32_MEMBER(irq_ack32_w);
|
||||||
DECLARE_WRITE16_MEMBER(sound_data_w);
|
DECLARE_WRITE16_MEMBER(sound_data_w);
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
struct gs_tempsprite *m_spritelist;
|
struct gs_tempsprite *m_spritelist;
|
||||||
struct gs_tempsprite *m_sprite_ptr_pre;
|
struct gs_tempsprite *m_sprite_ptr_pre;
|
||||||
bitmap_ind16 m_tmpbitmaps;
|
bitmap_ind16 m_tmpbitmaps;
|
||||||
galastrm_renderer *m_poly;
|
std::unique_ptr<galastrm_renderer> m_poly;
|
||||||
|
|
||||||
int m_rsxb;
|
int m_rsxb;
|
||||||
int m_rsyb;
|
int m_rsyb;
|
||||||
|
@ -340,7 +340,7 @@ public:
|
|||||||
DECLARE_CUSTOM_INPUT_MEMBER(acc_down_r);
|
DECLARE_CUSTOM_INPUT_MEMBER(acc_down_r);
|
||||||
DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r);
|
DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r);
|
||||||
|
|
||||||
hng64_poly_renderer* m_poly_renderer;
|
std::unique_ptr<hng64_poly_renderer> m_poly_renderer;
|
||||||
|
|
||||||
TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
|
TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public:
|
|||||||
UINT16 m_page_control;
|
UINT16 m_page_control;
|
||||||
UINT8 m_video_changed;
|
UINT8 m_video_changed;
|
||||||
emu_timer *m_scanline_timer;
|
emu_timer *m_scanline_timer;
|
||||||
midvunit_renderer *m_poly;
|
std::unique_ptr<midvunit_renderer> m_poly;
|
||||||
DECLARE_WRITE32_MEMBER(midvunit_dma_queue_w);
|
DECLARE_WRITE32_MEMBER(midvunit_dma_queue_w);
|
||||||
DECLARE_READ32_MEMBER(midvunit_dma_queue_entries_r);
|
DECLARE_READ32_MEMBER(midvunit_dma_queue_entries_r);
|
||||||
DECLARE_READ32_MEMBER(midvunit_dma_trigger_r);
|
DECLARE_READ32_MEMBER(midvunit_dma_trigger_r);
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
UINT8 *m_cvsd_protection_base;
|
UINT8 *m_cvsd_protection_base;
|
||||||
UINT8 m_autoerase_enable;
|
UINT8 m_autoerase_enable;
|
||||||
UINT32 m_palette_mask;
|
UINT32 m_palette_mask;
|
||||||
pen_t * m_pen_map;
|
std::unique_ptr<pen_t[]> m_pen_map;
|
||||||
std::unique_ptr<UINT16[]> m_local_videoram;
|
std::unique_ptr<UINT16[]> m_local_videoram;
|
||||||
UINT8 m_videobank_select;
|
UINT8 m_videobank_select;
|
||||||
UINT8 m_yawdim_dma;
|
UINT8 m_yawdim_dma;
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
std::unique_ptr<UINT8[]> m_pointram;
|
std::unique_ptr<UINT8[]> m_pointram;
|
||||||
int m_pointram_idx;
|
int m_pointram_idx;
|
||||||
UINT16 m_pointram_control;
|
UINT16 m_pointram_control;
|
||||||
dsp_state *m_mpDspState;
|
std::unique_ptr<dsp_state> m_mpDspState;
|
||||||
int m_mbNeedsKickstart;
|
int m_mbNeedsKickstart;
|
||||||
UINT32 m_pointrom_idx;
|
UINT32 m_pointrom_idx;
|
||||||
UINT8 m_mPointRomMSB;
|
UINT8 m_mPointRomMSB;
|
||||||
|
@ -293,7 +293,7 @@ public:
|
|||||||
struct stv_vdp1_poly_scanline scanline[512];
|
struct stv_vdp1_poly_scanline scanline[512];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stv_vdp1_poly_scanline_data* stv_vdp1_shading_data;
|
std::unique_ptr<struct stv_vdp1_poly_scanline_data> stv_vdp1_shading_data;
|
||||||
|
|
||||||
struct stv_vdp2_sprite_list
|
struct stv_vdp2_sprite_list
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
optional_shared_ptr<UINT16> m_cchip2_ram; // for megablst only
|
optional_shared_ptr<UINT16> m_cchip2_ram; // for megablst only
|
||||||
|
|
||||||
/* video-related */
|
/* video-related */
|
||||||
struct f2_tempsprite *m_spritelist;
|
std::unique_ptr<struct f2_tempsprite[]> m_spritelist;
|
||||||
int m_sprite_type;
|
int m_sprite_type;
|
||||||
|
|
||||||
UINT16 m_spritebank[8];
|
UINT16 m_spritebank[8];
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
UINT8 m_bg_hshift;
|
UINT8 m_bg_hshift;
|
||||||
tilemap_t *m_bg_tilemap1;
|
tilemap_t *m_bg_tilemap1;
|
||||||
tilemap_t *m_bg_tilemap2;
|
tilemap_t *m_bg_tilemap2;
|
||||||
rgb_t *m_palette_ptr;
|
std::unique_ptr<rgb_t[]> m_palette_ptr;
|
||||||
DECLARE_WRITE8_MEMBER(tiamc1_control_w);
|
DECLARE_WRITE8_MEMBER(tiamc1_control_w);
|
||||||
DECLARE_WRITE8_MEMBER(tiamc1_videoram_w);
|
DECLARE_WRITE8_MEMBER(tiamc1_videoram_w);
|
||||||
DECLARE_WRITE8_MEMBER(tiamc1_bankswitch_w);
|
DECLARE_WRITE8_MEMBER(tiamc1_bankswitch_w);
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
UINT8 m_blitter_window_enable;
|
UINT8 m_blitter_window_enable;
|
||||||
UINT8 m_cocktail;
|
UINT8 m_cocktail;
|
||||||
UINT8 m_port_select;
|
UINT8 m_port_select;
|
||||||
rgb_t *m_palette_lookup;
|
std::unique_ptr<rgb_t[]> m_palette_lookup;
|
||||||
UINT8 m_blitterram[8];
|
UINT8 m_blitterram[8];
|
||||||
UINT8 m_blitter_xor;
|
UINT8 m_blitter_xor;
|
||||||
UINT8 m_blitter_remap_index;
|
UINT8 m_blitter_remap_index;
|
||||||
|
@ -310,7 +310,7 @@ public:
|
|||||||
OHCIIsochronousTransferDescriptor isochronous_transfer_descriptor;
|
OHCIIsochronousTransferDescriptor isochronous_transfer_descriptor;
|
||||||
} ohcist;
|
} ohcist;
|
||||||
UINT8 pic16lc_buffer[0xff];
|
UINT8 pic16lc_buffer[0xff];
|
||||||
nv2a_renderer *nvidia_nv2a;
|
std::unique_ptr<nv2a_renderer> nvidia_nv2a;
|
||||||
bool debug_irq_active;
|
bool debug_irq_active;
|
||||||
int debug_irq_number;
|
int debug_irq_number;
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
@ -72,7 +72,7 @@ void apple2_state::apple2_update_memory()
|
|||||||
{
|
{
|
||||||
for (i = 0; m_mem_config.memmap[i].end; i++)
|
for (i = 0; m_mem_config.memmap[i].end; i++)
|
||||||
;
|
;
|
||||||
m_current_meminfo = auto_alloc_array(machine(), apple2_meminfo, i);
|
m_current_meminfo = std::make_unique<apple2_meminfo[]>(i);
|
||||||
full_update = 1;
|
full_update = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ UINT16 ns10_decrypter_device::decrypt(UINT16 cipherword)
|
|||||||
void ns10_decrypter_device::device_start()
|
void ns10_decrypter_device::device_start()
|
||||||
{
|
{
|
||||||
_active = false;
|
_active = false;
|
||||||
_reducer = auto_alloc(machine(), gf2_reducer());
|
_reducer = std::make_unique<gf2_reducer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ns10_decrypter_device::init(int iv)
|
void ns10_decrypter_device::init(int iv)
|
||||||
|
@ -44,7 +44,7 @@ private:
|
|||||||
bool _active;
|
bool _active;
|
||||||
const ns10_crypto_logic& _logic;
|
const ns10_crypto_logic& _logic;
|
||||||
static const int initSbox[16];
|
static const int initSbox[16];
|
||||||
const gf2_reducer *_reducer;
|
std::unique_ptr<const gf2_reducer>_reducer;
|
||||||
|
|
||||||
void device_start() override;
|
void device_start() override;
|
||||||
void init(int iv);
|
void init(int iv);
|
||||||
|
@ -119,7 +119,7 @@ void nand_device::device_start()
|
|||||||
m_accumulated_status = 0;
|
m_accumulated_status = 0;
|
||||||
m_mp_opcode = 0;
|
m_mp_opcode = 0;
|
||||||
m_mode_3065 = 0;
|
m_mode_3065 = 0;
|
||||||
m_pagereg = auto_alloc_array(machine(), UINT8, m_page_total_size);
|
m_pagereg = std::make_unique<UINT8[]>(m_page_total_size);
|
||||||
|
|
||||||
#ifdef SMARTMEDIA_IMAGE_SAVE
|
#ifdef SMARTMEDIA_IMAGE_SAVE
|
||||||
m_image_format = 0;
|
m_image_format = 0;
|
||||||
@ -151,7 +151,7 @@ bool smartmedia_image_device::smartmedia_format_1()
|
|||||||
m_num_pages = get_UINT32BE(custom_header.num_pages);
|
m_num_pages = get_UINT32BE(custom_header.num_pages);
|
||||||
m_log2_pages_per_block = get_UINT32BE(custom_header.log2_pages_per_block);
|
m_log2_pages_per_block = get_UINT32BE(custom_header.log2_pages_per_block);
|
||||||
m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages);
|
m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages);
|
||||||
m_data_uid_ptr = auto_alloc_array(machine(), UINT8, 256 + 16);
|
m_data_uid_ptr = std::make_unique<UINT8[]>(256 + 16);
|
||||||
m_mode = SM_M_INIT;
|
m_mode = SM_M_INIT;
|
||||||
m_pointer_mode = SM_PM_A;
|
m_pointer_mode = SM_PM_A;
|
||||||
m_page_addr = 0;
|
m_page_addr = 0;
|
||||||
@ -160,7 +160,7 @@ bool smartmedia_image_device::smartmedia_format_1()
|
|||||||
if (!is_readonly())
|
if (!is_readonly())
|
||||||
m_status |= 0x80;
|
m_status |= 0x80;
|
||||||
m_accumulated_status = 0;
|
m_accumulated_status = 0;
|
||||||
m_pagereg = auto_alloc_array(machine(), UINT8, m_page_total_size);
|
m_pagereg = std::make_unique<UINT8[]>(m_page_total_size);
|
||||||
memset( m_id, 0, sizeof( m_id));
|
memset( m_id, 0, sizeof( m_id));
|
||||||
m_id_len = 0;
|
m_id_len = 0;
|
||||||
m_col_address_cycles = 1;
|
m_col_address_cycles = 1;
|
||||||
@ -178,7 +178,7 @@ bool smartmedia_image_device::smartmedia_format_1()
|
|||||||
m_id_len = 3;
|
m_id_len = 3;
|
||||||
fread(m_id, m_id_len);
|
fread(m_id, m_id_len);
|
||||||
fread(&m_mp_opcode, 1);
|
fread(&m_mp_opcode, 1);
|
||||||
fread(m_data_uid_ptr, 256 + 16);
|
fread(m_data_uid_ptr.get(), 256 + 16);
|
||||||
}
|
}
|
||||||
fread(m_data_ptr, m_page_total_size*m_num_pages);
|
fread(m_data_ptr, m_page_total_size*m_num_pages);
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ bool smartmedia_image_device::smartmedia_format_2()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages);
|
m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages);
|
||||||
m_data_uid_ptr = auto_alloc_array(machine(), UINT8, 256 + 16);
|
m_data_uid_ptr = std::make_unique<UINT8[]>(256 + 16);
|
||||||
m_mode = SM_M_INIT;
|
m_mode = SM_M_INIT;
|
||||||
m_pointer_mode = SM_PM_A;
|
m_pointer_mode = SM_PM_A;
|
||||||
m_page_addr = 0;
|
m_page_addr = 0;
|
||||||
@ -255,7 +255,7 @@ bool smartmedia_image_device::smartmedia_format_2()
|
|||||||
if (!is_readonly())
|
if (!is_readonly())
|
||||||
m_status |= 0x80;
|
m_status |= 0x80;
|
||||||
m_accumulated_status = 0;
|
m_accumulated_status = 0;
|
||||||
m_pagereg = auto_alloc_array(machine(), UINT8, m_page_total_size);
|
m_pagereg = std::make_unique<UINT8[]>(m_page_total_size);
|
||||||
m_id_len = 3;
|
m_id_len = 3;
|
||||||
memcpy( m_id, custom_header.data1, m_id_len);
|
memcpy( m_id, custom_header.data1, m_id_len);
|
||||||
m_mp_opcode = 0;
|
m_mp_opcode = 0;
|
||||||
@ -265,10 +265,10 @@ bool smartmedia_image_device::smartmedia_format_2()
|
|||||||
|
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
memcpy( m_data_uid_ptr + i * 32, custom_header.data2, 16);
|
memcpy( m_data_uid_ptr.get() + i * 32, custom_header.data2, 16);
|
||||||
for (j=0;j<16;j++) m_data_uid_ptr[i*32+16+j] = custom_header.data2[j] ^ 0xFF;
|
for (j=0;j<16;j++) m_data_uid_ptr[i*32+16+j] = custom_header.data2[j] ^ 0xFF;
|
||||||
}
|
}
|
||||||
memcpy( m_data_uid_ptr + 256, custom_header.data3, 16);
|
memcpy( m_data_uid_ptr.get() + 256, custom_header.data3, 16);
|
||||||
|
|
||||||
fread(m_data_ptr, m_page_total_size*m_num_pages);
|
fread(m_data_ptr, m_page_total_size*m_num_pages);
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ void smartmedia_image_device::call_unload()
|
|||||||
m_byte_addr = 0;
|
m_byte_addr = 0;
|
||||||
m_status = 0xC0;
|
m_status = 0xC0;
|
||||||
m_accumulated_status = 0;
|
m_accumulated_status = 0;
|
||||||
m_pagereg = auto_alloc_array(machine(), UINT8, m_page_total_size);
|
m_pagereg = std::make_unique<UINT8[]>(m_page_total_size);
|
||||||
memset( m_id, 0, sizeof( m_id));
|
memset( m_id, 0, sizeof( m_id));
|
||||||
m_id_len = 0;
|
m_id_len = 0;
|
||||||
m_mp_opcode = 0;
|
m_mp_opcode = 0;
|
||||||
@ -440,7 +440,7 @@ void nand_device::command_w(UINT8 data)
|
|||||||
m_page_addr = 0;
|
m_page_addr = 0;
|
||||||
m_addr_load_ptr = 0;
|
m_addr_load_ptr = 0;
|
||||||
m_program_byte_count = 0;
|
m_program_byte_count = 0;
|
||||||
memset(m_pagereg, 0xff, m_page_total_size);
|
memset(m_pagereg.get(), 0xff, m_page_total_size);
|
||||||
break;
|
break;
|
||||||
case 0x10: // Page Program (2nd cycle)
|
case 0x10: // Page Program (2nd cycle)
|
||||||
case 0x15:
|
case 0x15:
|
||||||
|
@ -160,8 +160,8 @@ protected:
|
|||||||
// 0 means no card loaded
|
// 0 means no card loaded
|
||||||
int m_log2_pages_per_block; // log2 of number of pages per erase block (usually 4 or 5)
|
int m_log2_pages_per_block; // log2 of number of pages per erase block (usually 4 or 5)
|
||||||
|
|
||||||
UINT8 *m_data_ptr; // FEEPROM data area
|
UINT8* m_data_ptr; // FEEPROM data area
|
||||||
UINT8 *m_data_uid_ptr;
|
std::unique_ptr<UINT8[]> m_data_uid_ptr;
|
||||||
|
|
||||||
sm_mode_t m_mode; // current operation mode
|
sm_mode_t m_mode; // current operation mode
|
||||||
pointer_sm_mode_t m_pointer_mode; // pointer mode
|
pointer_sm_mode_t m_pointer_mode; // pointer mode
|
||||||
@ -173,7 +173,7 @@ protected:
|
|||||||
int m_status; // current status
|
int m_status; // current status
|
||||||
int m_accumulated_status; // accumulated status
|
int m_accumulated_status; // accumulated status
|
||||||
|
|
||||||
UINT8 *m_pagereg; // page register used by program command
|
std::unique_ptr<UINT8[]> m_pagereg; // page register used by program command
|
||||||
UINT8 m_id[5]; // chip ID
|
UINT8 m_id[5]; // chip ID
|
||||||
UINT8 m_mp_opcode; // multi-plane operation code
|
UINT8 m_mp_opcode; // multi-plane operation code
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ void dump_decrypted(running_machine& machine, UINT8* decrypt)
|
|||||||
void subsino_decrypt(running_machine& machine, void (*bitswaps)(UINT8 *decrypt, int i), const UINT8 *xors, int size)
|
void subsino_decrypt(running_machine& machine, void (*bitswaps)(UINT8 *decrypt, int i), const UINT8 *xors, int size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x10000);
|
std::unique_ptr<UINT8[]> decrypt = std::make_unique<UINT8[]>(0x10000);
|
||||||
UINT8* region = machine.root_device().memregion("maincpu")->base();
|
UINT8* region = machine.root_device().memregion("maincpu")->base();
|
||||||
|
|
||||||
for (i=0;i<0x10000;i++)
|
for (i=0;i<0x10000;i++)
|
||||||
@ -94,7 +94,7 @@ void subsino_decrypt(running_machine& machine, void (*bitswaps)(UINT8 *decrypt,
|
|||||||
if (i<size)
|
if (i<size)
|
||||||
{
|
{
|
||||||
decrypt[i] = region[i]^xors[i&7];
|
decrypt[i] = region[i]^xors[i&7];
|
||||||
bitswaps(decrypt, i);
|
bitswaps(decrypt.get(), i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -102,5 +102,5 @@ void subsino_decrypt(running_machine& machine, void (*bitswaps)(UINT8 *decrypt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// dump_decrypted(machine, decrypt);
|
// dump_decrypted(machine, decrypt);
|
||||||
memcpy(region, decrypt, 0x10000);
|
memcpy(region, decrypt.get(), 0x10000);
|
||||||
}
|
}
|
||||||
|
@ -1427,7 +1427,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
void xbox_base_state::machine_start()
|
void xbox_base_state::machine_start()
|
||||||
{
|
{
|
||||||
nvidia_nv2a = auto_alloc(machine(), nv2a_renderer(machine()));
|
nvidia_nv2a = std::make_unique<nv2a_renderer>(machine());
|
||||||
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
|
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
|
||||||
pic16lc_buffer[0] = 'B';
|
pic16lc_buffer[0] = 'B';
|
||||||
pic16lc_buffer[4] = 0; // A/V connector, 2=vga
|
pic16lc_buffer[4] = 0; // A/V connector, 2=vga
|
||||||
|
@ -68,14 +68,14 @@ gaelco3d_renderer::gaelco3d_renderer(gaelco3d_state &state)
|
|||||||
|
|
||||||
void gaelco3d_state::video_start()
|
void gaelco3d_state::video_start()
|
||||||
{
|
{
|
||||||
m_poly = auto_alloc(machine(), gaelco3d_renderer(*this));
|
m_poly = std::make_unique<gaelco3d_renderer>(*this);
|
||||||
|
|
||||||
m_palette = auto_alloc_array(machine(), rgb_t, 32768);
|
m_palette = std::make_unique<rgb_t[]>(32768);
|
||||||
m_polydata_buffer = std::make_unique<UINT32[]>(MAX_POLYDATA);
|
m_polydata_buffer = std::make_unique<UINT32[]>(MAX_POLYDATA);
|
||||||
|
|
||||||
/* save states */
|
/* save states */
|
||||||
|
|
||||||
save_pointer(NAME(m_palette), 32768);
|
save_pointer(NAME(m_palette.get()), 32768);
|
||||||
save_pointer(NAME(m_polydata_buffer.get()), MAX_POLYDATA);
|
save_pointer(NAME(m_polydata_buffer.get()), MAX_POLYDATA);
|
||||||
save_item(NAME(m_polydata_count));
|
save_item(NAME(m_polydata_count));
|
||||||
save_item(NAME(m_lastscan));
|
save_item(NAME(m_lastscan));
|
||||||
@ -208,7 +208,7 @@ void gaelco3d_renderer::render_noz_noperspective(INT32 scanline, const extent_t
|
|||||||
float voz_step = object.voz_dx * zbase;
|
float voz_step = object.voz_dx * zbase;
|
||||||
int zbufval = (int)(-object.z0 * zbase);
|
int zbufval = (int)(-object.z0 * zbase);
|
||||||
offs_t endmask = m_texture_size - 1;
|
offs_t endmask = m_texture_size - 1;
|
||||||
const rgb_t *palsource = m_state.m_palette + object.color;
|
const rgb_t *palsource = m_state.m_palette.get() + object.color;
|
||||||
UINT32 tex = object.tex;
|
UINT32 tex = object.tex;
|
||||||
UINT16 *dest = &m_screenbits.pix16(scanline);
|
UINT16 *dest = &m_screenbits.pix16(scanline);
|
||||||
UINT16 *zbuf = &m_zbuffer.pix16(scanline);
|
UINT16 *zbuf = &m_zbuffer.pix16(scanline);
|
||||||
@ -246,7 +246,7 @@ void gaelco3d_renderer::render_normal(INT32 scanline, const extent_t &extent, co
|
|||||||
float uoz_dx = object.uoz_dx;
|
float uoz_dx = object.uoz_dx;
|
||||||
float voz_dx = object.voz_dx;
|
float voz_dx = object.voz_dx;
|
||||||
offs_t endmask = m_texture_size - 1;
|
offs_t endmask = m_texture_size - 1;
|
||||||
const rgb_t *palsource = m_state.m_palette + object.color;
|
const rgb_t *palsource = m_state.m_palette.get() + object.color;
|
||||||
UINT32 tex = object.tex;
|
UINT32 tex = object.tex;
|
||||||
float z0 = object.z0;
|
float z0 = object.z0;
|
||||||
UINT16 *dest = &m_screenbits.pix16(scanline);
|
UINT16 *dest = &m_screenbits.pix16(scanline);
|
||||||
@ -296,7 +296,7 @@ void gaelco3d_renderer::render_alphablend(INT32 scanline, const extent_t &extent
|
|||||||
float uoz_dx = object.uoz_dx;
|
float uoz_dx = object.uoz_dx;
|
||||||
float voz_dx = object.voz_dx;
|
float voz_dx = object.voz_dx;
|
||||||
offs_t endmask = m_texture_size - 1;
|
offs_t endmask = m_texture_size - 1;
|
||||||
const rgb_t *palsource = m_state.m_palette + object.color;
|
const rgb_t *palsource = m_state.m_palette.get() + object.color;
|
||||||
UINT32 tex = object.tex;
|
UINT32 tex = object.tex;
|
||||||
float z0 = object.z0;
|
float z0 = object.z0;
|
||||||
UINT16 *dest = &m_screenbits.pix16(scanline);
|
UINT16 *dest = &m_screenbits.pix16(scanline);
|
||||||
|
@ -21,7 +21,7 @@ void galastrm_state::video_start()
|
|||||||
{
|
{
|
||||||
m_spritelist = auto_alloc_array(machine(), struct gs_tempsprite, 0x4000);
|
m_spritelist = auto_alloc_array(machine(), struct gs_tempsprite, 0x4000);
|
||||||
|
|
||||||
m_poly = auto_alloc(machine(), galastrm_renderer(*this));
|
m_poly = std::make_unique<galastrm_renderer>(*this);
|
||||||
|
|
||||||
m_screen->register_screen_bitmap(m_tmpbitmaps);
|
m_screen->register_screen_bitmap(m_tmpbitmaps);
|
||||||
m_screen->register_screen_bitmap(m_poly->screenbits());
|
m_screen->register_screen_bitmap(m_poly->screenbits());
|
||||||
|
@ -1285,7 +1285,7 @@ void hng64_state::video_start()
|
|||||||
m_additive_tilemap_debug = 0;
|
m_additive_tilemap_debug = 0;
|
||||||
|
|
||||||
// Rasterizer creation
|
// Rasterizer creation
|
||||||
m_poly_renderer = auto_alloc(machine(), hng64_poly_renderer(*this));
|
m_poly_renderer = std::make_unique<hng64_poly_renderer>(*this);
|
||||||
|
|
||||||
// 3d information
|
// 3d information
|
||||||
m_dl = std::make_unique<UINT16[]>(0x100);
|
m_dl = std::make_unique<UINT16[]>(0x100);
|
||||||
|
@ -70,7 +70,7 @@ void kaneko16_sprite_device::static_set_gfxdecode_tag(device_t &device, const ch
|
|||||||
|
|
||||||
void kaneko16_sprite_device::device_start()
|
void kaneko16_sprite_device::device_start()
|
||||||
{
|
{
|
||||||
m_first_sprite = auto_alloc_array(machine(), struct kan_tempsprite, 0x400);
|
m_first_sprite = std::make_unique<struct kan_tempsprite[]>(0x400);
|
||||||
m_sprites_regs = make_unique_clear<UINT16[]>(0x20/2);
|
m_sprites_regs = make_unique_clear<UINT16[]>(0x20/2);
|
||||||
m_screen->register_screen_bitmap(m_sprites_bitmap);
|
m_screen->register_screen_bitmap(m_sprites_bitmap);
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ void kaneko16_sprite_device::kaneko16_draw_sprites(_BitmapClass &bitmap, const r
|
|||||||
int max = (m_screen->width() > 0x100) ? (0x200<<6) : (0x100<<6);
|
int max = (m_screen->width() > 0x100) ? (0x200<<6) : (0x100<<6);
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
struct kan_tempsprite *s = m_first_sprite;
|
struct kan_tempsprite *s = m_first_sprite.get();
|
||||||
|
|
||||||
/* These values are latched from the last sprite. */
|
/* These values are latched from the last sprite. */
|
||||||
int x = 0;
|
int x = 0;
|
||||||
@ -451,7 +451,7 @@ void kaneko16_sprite_device::kaneko16_draw_sprites(_BitmapClass &bitmap, const r
|
|||||||
/* Let's finally draw the sprites we buffered, in reverse order
|
/* Let's finally draw the sprites we buffered, in reverse order
|
||||||
(for pdrawgfx) */
|
(for pdrawgfx) */
|
||||||
|
|
||||||
for (s--; s >= m_first_sprite; s--)
|
for (s--; s >= m_first_sprite.get(); s--)
|
||||||
{
|
{
|
||||||
int curr_pri = s->priority;
|
int curr_pri = s->priority;
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ private:
|
|||||||
UINT16 m_sprite_flipy;
|
UINT16 m_sprite_flipy;
|
||||||
std::unique_ptr<UINT16[]> m_sprites_regs;
|
std::unique_ptr<UINT16[]> m_sprites_regs;
|
||||||
|
|
||||||
struct kan_tempsprite *m_first_sprite;
|
std::unique_ptr<struct kan_tempsprite[]> m_first_sprite;
|
||||||
int m_keep_sprites;
|
int m_keep_sprites;
|
||||||
bitmap_ind16 m_sprites_bitmap;
|
bitmap_ind16 m_sprites_bitmap;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void midvunit_state::video_start()
|
|||||||
{
|
{
|
||||||
m_scanline_timer = timer_alloc(TIMER_SCANLINE);
|
m_scanline_timer = timer_alloc(TIMER_SCANLINE);
|
||||||
|
|
||||||
m_poly = auto_alloc(machine(), midvunit_renderer(*this));
|
m_poly = std::make_unique<midvunit_renderer>(*this);
|
||||||
|
|
||||||
save_item(NAME(m_video_regs));
|
save_item(NAME(m_video_regs));
|
||||||
save_item(NAME(m_dma_data));
|
save_item(NAME(m_dma_data));
|
||||||
|
@ -44,7 +44,7 @@ VIDEO_START_MEMBER(midyunit_state,common)
|
|||||||
/* allocate memory */
|
/* allocate memory */
|
||||||
m_cmos_ram = std::make_unique<UINT16[]>((0x2000 * 4)/2);
|
m_cmos_ram = std::make_unique<UINT16[]>((0x2000 * 4)/2);
|
||||||
m_local_videoram = make_unique_clear<UINT16[]>(0x80000/2);
|
m_local_videoram = make_unique_clear<UINT16[]>(0x80000/2);
|
||||||
m_pen_map = auto_alloc_array(machine(), pen_t, 65536);
|
m_pen_map = std::make_unique<pen_t[]>(65536);
|
||||||
|
|
||||||
machine().device<nvram_device>("nvram")->set_base(m_cmos_ram.get(), 0x2000 * 4);
|
machine().device<nvram_device>("nvram")->set_base(m_cmos_ram.get(), 0x2000 * 4);
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ neosprite_base_device::neosprite_base_device(const machine_config &mconfig, cons
|
|||||||
|
|
||||||
void neosprite_base_device::device_start()
|
void neosprite_base_device::device_start()
|
||||||
{
|
{
|
||||||
m_videoram = auto_alloc_array(machine(), UINT16, 0x8000 + 0x800);
|
m_videoram = std::make_unique<UINT16[]>(0x8000 + 0x800);
|
||||||
m_videoram_drawsource = m_videoram;
|
m_videoram_drawsource = m_videoram.get();
|
||||||
|
|
||||||
/* clear allocated memory */
|
/* clear allocated memory */
|
||||||
memset(m_videoram, 0x00, (0x8000 + 0x800) * sizeof(UINT16));
|
memset(m_videoram.get(), 0x00, (0x8000 + 0x800) * sizeof(UINT16));
|
||||||
|
|
||||||
create_sprite_line_timer();
|
create_sprite_line_timer();
|
||||||
create_auto_animation_timer();
|
create_auto_animation_timer();
|
||||||
@ -48,7 +48,7 @@ void neosprite_base_device::device_start()
|
|||||||
m_auto_animation_frame_counter = 0;
|
m_auto_animation_frame_counter = 0;
|
||||||
|
|
||||||
/* register for state saving */
|
/* register for state saving */
|
||||||
save_pointer(NAME(m_videoram), 0x8000 + 0x800);
|
save_pointer(NAME(m_videoram.get()), 0x8000 + 0x800);
|
||||||
save_item(NAME(m_vram_offset));
|
save_item(NAME(m_vram_offset));
|
||||||
save_item(NAME(m_vram_read_buffer));
|
save_item(NAME(m_vram_read_buffer));
|
||||||
save_item(NAME(m_vram_modulo));
|
save_item(NAME(m_vram_modulo));
|
||||||
@ -772,16 +772,16 @@ void neosprite_midas_device::device_start()
|
|||||||
{
|
{
|
||||||
neosprite_base_device::device_start();
|
neosprite_base_device::device_start();
|
||||||
|
|
||||||
m_videoram_buffer = auto_alloc_array(machine(), UINT16, 0x8000 + 0x800);
|
m_videoram_buffer = std::make_unique<UINT16[]>(0x8000 + 0x800);
|
||||||
m_videoram_drawsource = m_videoram_buffer;
|
m_videoram_drawsource = m_videoram_buffer.get();
|
||||||
|
|
||||||
memset(m_videoram_buffer, 0x00, (0x8000 + 0x800) * sizeof(UINT16));
|
memset(m_videoram_buffer.get(), 0x00, (0x8000 + 0x800) * sizeof(UINT16));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void neosprite_midas_device::buffer_vram()
|
void neosprite_midas_device::buffer_vram()
|
||||||
{
|
{
|
||||||
memcpy(m_videoram_buffer, m_videoram, (0x8000 + 0x800) * sizeof(UINT16));
|
memcpy(m_videoram_buffer.get(), m_videoram.get(), (0x8000 + 0x800) * sizeof(UINT16));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void neosprite_midas_device::draw_fixed_layer_2pixels(UINT32*&pixel_addr, int offset, UINT8* gfx_base, const pen_t* char_pens)
|
inline void neosprite_midas_device::draw_fixed_layer_2pixels(UINT32*&pixel_addr, int offset, UINT8* gfx_base, const pen_t* char_pens)
|
||||||
|
@ -51,7 +51,7 @@ public:
|
|||||||
void set_screen(screen_device* screen);
|
void set_screen(screen_device* screen);
|
||||||
void set_pens(const pen_t* pens);
|
void set_pens(const pen_t* pens);
|
||||||
|
|
||||||
UINT16 *m_videoram;
|
std::unique_ptr<UINT16[]> m_videoram;
|
||||||
UINT16 *m_videoram_drawsource;
|
UINT16 *m_videoram_drawsource;
|
||||||
|
|
||||||
UINT16 m_vram_offset;
|
UINT16 m_vram_offset;
|
||||||
@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
virtual void draw_pixel(int romaddr, UINT32* dst, const pen_t *line_pens) override;
|
virtual void draw_pixel(int romaddr, UINT32* dst, const pen_t *line_pens) override;
|
||||||
|
|
||||||
UINT16* m_videoram_buffer;
|
std::unique_ptr<UINT16[]> m_videoram_buffer;
|
||||||
void buffer_vram();
|
void buffer_vram();
|
||||||
virtual void draw_fixed_layer_2pixels(UINT32*&pixel_addr, int offset, UINT8* gfx_base, const pen_t* char_pens) override;
|
virtual void draw_fixed_layer_2pixels(UINT32*&pixel_addr, int offset, UINT8* gfx_base, const pen_t* char_pens) override;
|
||||||
virtual void set_sprite_region(UINT8* region_sprites, UINT32 region_sprites_size) override;
|
virtual void set_sprite_region(UINT8* region_sprites, UINT32 region_sprites_size) override;
|
||||||
|
@ -224,8 +224,8 @@ void ppu2c0x_device::device_start()
|
|||||||
/* allocate a screen bitmap, videomem and spriteram, a dirtychar array and the monochromatic colortable */
|
/* allocate a screen bitmap, videomem and spriteram, a dirtychar array and the monochromatic colortable */
|
||||||
m_bitmap = std::make_unique<bitmap_ind16>(VISIBLE_SCREEN_WIDTH, VISIBLE_SCREEN_HEIGHT);
|
m_bitmap = std::make_unique<bitmap_ind16>(VISIBLE_SCREEN_WIDTH, VISIBLE_SCREEN_HEIGHT);
|
||||||
m_spriteram = make_unique_clear<UINT8[]>(SPRITERAM_SIZE);
|
m_spriteram = make_unique_clear<UINT8[]>(SPRITERAM_SIZE);
|
||||||
m_colortable = auto_alloc_array(machine(), pen_t, ARRAY_LENGTH(default_colortable));
|
m_colortable = std::make_unique<pen_t[]>(ARRAY_LENGTH(default_colortable));
|
||||||
m_colortable_mono = auto_alloc_array(machine(), pen_t, ARRAY_LENGTH(default_colortable_mono));
|
m_colortable_mono = std::make_unique<pen_t[]>(ARRAY_LENGTH(default_colortable_mono));
|
||||||
|
|
||||||
/* initialize the color tables */
|
/* initialize the color tables */
|
||||||
for (int i = 0; i < ARRAY_LENGTH(default_colortable_mono); i++)
|
for (int i = 0; i < ARRAY_LENGTH(default_colortable_mono); i++)
|
||||||
@ -257,8 +257,8 @@ void ppu2c0x_device::device_start()
|
|||||||
save_item(NAME(m_draw_phase));
|
save_item(NAME(m_draw_phase));
|
||||||
save_item(NAME(m_tilecount));
|
save_item(NAME(m_tilecount));
|
||||||
save_pointer(NAME(m_spriteram.get()), SPRITERAM_SIZE);
|
save_pointer(NAME(m_spriteram.get()), SPRITERAM_SIZE);
|
||||||
save_pointer(NAME(m_colortable), ARRAY_LENGTH(default_colortable));
|
save_pointer(NAME(m_colortable.get()), ARRAY_LENGTH(default_colortable));
|
||||||
save_pointer(NAME(m_colortable_mono), ARRAY_LENGTH(default_colortable_mono));
|
save_pointer(NAME(m_colortable_mono.get()), ARRAY_LENGTH(default_colortable_mono));
|
||||||
save_item(NAME(*m_bitmap));
|
save_item(NAME(*m_bitmap));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,12 +571,12 @@ void ppu2c0x_device::draw_background( UINT8 *line_priority )
|
|||||||
if (m_regs[PPU_CONTROL1] & PPU_CONTROL1_DISPLAY_MONO)
|
if (m_regs[PPU_CONTROL1] & PPU_CONTROL1_DISPLAY_MONO)
|
||||||
{
|
{
|
||||||
color_mask = 0xf0;
|
color_mask = 0xf0;
|
||||||
color_table = m_colortable_mono;
|
color_table = m_colortable_mono.get();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
color_mask = 0xff;
|
color_mask = 0xff;
|
||||||
color_table = m_colortable;
|
color_table = m_colortable.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cache the background pen */
|
/* cache the background pen */
|
||||||
|
@ -190,8 +190,8 @@ public:
|
|||||||
|
|
||||||
std::unique_ptr<bitmap_ind16> m_bitmap; /* target bitmap */
|
std::unique_ptr<bitmap_ind16> m_bitmap; /* target bitmap */
|
||||||
std::unique_ptr<UINT8[]> m_spriteram; /* sprite ram */
|
std::unique_ptr<UINT8[]> m_spriteram; /* sprite ram */
|
||||||
pen_t *m_colortable; /* color table modified at run time */
|
std::unique_ptr<pen_t[]> m_colortable; /* color table modified at run time */
|
||||||
pen_t *m_colortable_mono; /* monochromatic color table modified at run time */
|
std::unique_ptr<pen_t[]> m_colortable_mono; /* monochromatic color table modified at run time */
|
||||||
int m_scanline; /* scanline count */
|
int m_scanline; /* scanline count */
|
||||||
ppu2c0x_scanline_delegate m_scanline_callback_proc; /* optional scanline callback */
|
ppu2c0x_scanline_delegate m_scanline_callback_proc; /* optional scanline callback */
|
||||||
ppu2c0x_hblank_delegate m_hblank_callback_proc; /* optional hblank callback */
|
ppu2c0x_hblank_delegate m_hblank_callback_proc; /* optional hblank callback */
|
||||||
|
@ -36,7 +36,7 @@ void taitof2_state::taitof2_core_vh_start (int sprite_type, int hide, int flip_h
|
|||||||
|
|
||||||
m_spriteram_delayed = make_unique_clear<UINT16[]>(m_spriteram.bytes() / 2);
|
m_spriteram_delayed = make_unique_clear<UINT16[]>(m_spriteram.bytes() / 2);
|
||||||
m_spriteram_buffered = make_unique_clear<UINT16[]>(m_spriteram.bytes() / 2);
|
m_spriteram_buffered = make_unique_clear<UINT16[]>(m_spriteram.bytes() / 2);
|
||||||
m_spritelist = auto_alloc_array_clear(machine(), struct f2_tempsprite, 0x400);
|
m_spritelist = make_unique_clear<struct f2_tempsprite[]>(0x400);
|
||||||
|
|
||||||
for (i = 0; i < 8; i ++)
|
for (i = 0; i < 8; i ++)
|
||||||
{
|
{
|
||||||
@ -487,7 +487,7 @@ void taitof2_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, c
|
|||||||
|
|
||||||
/* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
|
/* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
|
||||||
while processing sprite ram and then draw them all at the end */
|
while processing sprite ram and then draw them all at the end */
|
||||||
struct f2_tempsprite *sprite_ptr = m_spritelist;
|
struct f2_tempsprite *sprite_ptr = m_spritelist.get();
|
||||||
|
|
||||||
/* must remember enable status from last frame because driftout fails to
|
/* must remember enable status from last frame because driftout fails to
|
||||||
reactivate them from a certain point onwards. */
|
reactivate them from a certain point onwards. */
|
||||||
@ -775,7 +775,7 @@ void taitof2_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, c
|
|||||||
|
|
||||||
|
|
||||||
/* this happens only if primsks != NULL */
|
/* this happens only if primsks != NULL */
|
||||||
while (sprite_ptr != m_spritelist)
|
while (sprite_ptr != m_spritelist.get())
|
||||||
{
|
{
|
||||||
sprite_ptr--;
|
sprite_ptr--;
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ void tc0780fpa_device::device_start()
|
|||||||
m_texture = std::make_unique<UINT8[]>(0x400000);
|
m_texture = std::make_unique<UINT8[]>(0x400000);
|
||||||
m_poly_fifo = std::make_unique<UINT16[]>(POLY_FIFO_SIZE);
|
m_poly_fifo = std::make_unique<UINT16[]>(POLY_FIFO_SIZE);
|
||||||
|
|
||||||
m_renderer = auto_alloc(machine(), tc0780fpa_renderer(*this, *m_screen, m_texture.get()));
|
m_renderer = std::make_unique<tc0780fpa_renderer>(*this, *m_screen, m_texture.get());
|
||||||
|
|
||||||
save_pointer(NAME(m_texture.get()), 0x400000);
|
save_pointer(NAME(m_texture.get()), 0x400000);
|
||||||
save_pointer(NAME(m_poly_fifo.get()), POLY_FIFO_SIZE);
|
save_pointer(NAME(m_poly_fifo.get()), POLY_FIFO_SIZE);
|
||||||
|
@ -69,7 +69,7 @@ private:
|
|||||||
std::unique_ptr<UINT16[]> m_poly_fifo;
|
std::unique_ptr<UINT16[]> m_poly_fifo;
|
||||||
int m_poly_fifo_ptr;
|
int m_poly_fifo_ptr;
|
||||||
|
|
||||||
tc0780fpa_renderer *m_renderer;
|
std::unique_ptr<tc0780fpa_renderer> m_renderer;
|
||||||
|
|
||||||
UINT16 m_tex_address;
|
UINT16 m_tex_address;
|
||||||
UINT16 m_tex_offset;
|
UINT16 m_tex_offset;
|
||||||
|
@ -95,7 +95,7 @@ PALETTE_INIT_MEMBER(tiamc1_state, tiamc1)
|
|||||||
int r, g, b, ir, ig, ib;
|
int r, g, b, ir, ig, ib;
|
||||||
float tcol;
|
float tcol;
|
||||||
|
|
||||||
m_palette_ptr = auto_alloc_array(machine(), rgb_t, 256);
|
m_palette_ptr = std::make_unique<rgb_t[]>(256);
|
||||||
|
|
||||||
for (col = 0; col < 256; col++) {
|
for (col = 0; col < 256; col++) {
|
||||||
ir = (col >> 3) & 7;
|
ir = (col >> 3) & 7;
|
||||||
|
@ -276,7 +276,7 @@ void williams_state::create_palette_lookup()
|
|||||||
2, resistances_b, weights_b, 0, 0);
|
2, resistances_b, weights_b, 0, 0);
|
||||||
|
|
||||||
/* build a palette lookup */
|
/* build a palette lookup */
|
||||||
m_palette_lookup = auto_alloc_array(machine(), rgb_t, 256);
|
m_palette_lookup = std::make_unique<rgb_t[]>(256);
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
int r = combine_3_weights(weights_r, BIT(i,0), BIT(i,1), BIT(i,2));
|
int r = combine_3_weights(weights_r, BIT(i,0), BIT(i,1), BIT(i,2));
|
||||||
|
Loading…
Reference in New Issue
Block a user