mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
[patinho] indentation / comments cleanup
This commit is contained in:
parent
864f32d774
commit
f387764de1
@ -46,7 +46,7 @@ static ADDRESS_MAP_START(prog_8bit, AS_PROGRAM, 8, patinho_feio_cpu_device)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
patinho_feio_cpu_device::patinho_feio_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: cpu_device(mconfig, PATINHO_FEIO, "PATINHO FEIO", tag, owner, clock, "patinho_feio_cpu", __FILE__),
|
||||
: cpu_device(mconfig, PATINHO_FEIO, "PATINHO FEIO", tag, owner, clock, "patinho_feio_cpu", __FILE__),
|
||||
m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, ADDRESS_MAP_NAME(prog_8bit)),
|
||||
m_icount(0)
|
||||
{
|
||||
@ -56,11 +56,11 @@ void patinho_feio_cpu_device::device_start()
|
||||
{
|
||||
m_program = &space(AS_PROGRAM);
|
||||
|
||||
save_item(NAME(m_pc));
|
||||
save_item(NAME(m_acc));
|
||||
save_item(NAME(m_pc));
|
||||
save_item(NAME(m_acc));
|
||||
|
||||
// Register state for debugger
|
||||
state_add( PATINHO_FEIO_CI, "CI", m_pc ).mask(0xFFF);
|
||||
// Register state for debugger
|
||||
state_add( PATINHO_FEIO_CI, "CI", m_pc ).mask(0xFFF);
|
||||
state_add( PATINHO_FEIO_ACC, "ACC", m_acc ).mask(0xFF);
|
||||
state_add( PATINHO_FEIO_IDX, "IDX", m_idx ).mask(0xFF);
|
||||
state_add(STATE_GENPC, "GENPC", m_pc).formatstr("0%06O").noshow();
|
||||
@ -90,16 +90,16 @@ void patinho_feio_cpu_device::device_reset()
|
||||
/* execute instructions on this CPU until icount expires */
|
||||
void patinho_feio_cpu_device::execute_run()
|
||||
{
|
||||
do
|
||||
{
|
||||
if ((! m_run)){
|
||||
m_icount = 0; /* if processor is stopped, just burn cycles */
|
||||
do
|
||||
{
|
||||
if ((! m_run)){
|
||||
m_icount = 0; /* if processor is stopped, just burn cycles */
|
||||
} else {
|
||||
execute_instruction();
|
||||
m_icount --;
|
||||
}
|
||||
}
|
||||
while (m_icount > 0);
|
||||
m_icount --;
|
||||
}
|
||||
}
|
||||
while (m_icount > 0);
|
||||
}
|
||||
|
||||
/* execute one instruction */
|
||||
@ -389,7 +389,7 @@ void patinho_feio_cpu_device::execute_instruction()
|
||||
|
||||
offs_t patinho_feio_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE( patinho_feio );
|
||||
return CPU_DISASSEMBLE_NAME(patinho_feio)(this, buffer, pc, oprom, opram, options);
|
||||
extern CPU_DISASSEMBLE( patinho_feio );
|
||||
return CPU_DISASSEMBLE_NAME(patinho_feio)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
/* register IDs */
|
||||
enum
|
||||
{
|
||||
PATINHO_FEIO_CI=1, PATINHO_FEIO_ACC, PATINHO_FEIO_IDX
|
||||
PATINHO_FEIO_CI=1, PATINHO_FEIO_ACC, PATINHO_FEIO_IDX
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -19,23 +19,26 @@ enum {
|
||||
class patinho_feio_cpu_device : public cpu_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
patinho_feio_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
|
||||
// construction/destruction
|
||||
patinho_feio_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
|
||||
|
||||
protected:
|
||||
virtual void execute_run();
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
|
||||
virtual void execute_run();
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
|
||||
|
||||
address_space_config m_program_config;
|
||||
|
||||
/* processor registers */
|
||||
unsigned char m_acc; /* accumulator (8 bits) */
|
||||
unsigned int m_pc; /* program counter (12 bits)
|
||||
(CI stands for "Contador de Instrucao") */
|
||||
* Actual register name is CI, which
|
||||
* stands for "Contador de Instrucao"
|
||||
* or "instructions counter".
|
||||
*/
|
||||
unsigned char m_idx;
|
||||
|
||||
/* processor state flip-flops */
|
||||
bool m_run; /* processor is running */
|
||||
bool m_run; /* processor is running */
|
||||
bool m_wait_for_interrupt;
|
||||
bool m_interrupts_enabled;
|
||||
bool m_scheduled_IND_bit_reset;
|
||||
@ -49,7 +52,7 @@ protected:
|
||||
bool m_device_is_ok[16];
|
||||
bool m_IRQ_request[16];
|
||||
|
||||
int m_address_mask; /* address mask */
|
||||
int m_address_mask; /* address mask */
|
||||
int m_icount;
|
||||
|
||||
address_space *m_program;
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
CPU_DISASSEMBLE( patinho_feio )
|
||||
{
|
||||
int addr, value, n, f;
|
||||
int addr, value, n, f;
|
||||
|
||||
switch (oprom[0] & 0xF0)
|
||||
{
|
||||
switch (oprom[0] & 0xF0)
|
||||
{
|
||||
case 0x00:
|
||||
//PLA = "Pula": Unconditionally JUMP to effective address
|
||||
addr = (oprom[0] & 0x0F) << 8 | oprom[1];
|
||||
@ -144,7 +144,7 @@ CPU_DISASSEMBLE( patinho_feio )
|
||||
addr = (oprom[0] & 0x0F) << 8 | oprom[1];
|
||||
sprintf (buffer, "PUG /%03X", addr);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
sprintf (buffer, "illegal instruction");
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user