Previous 199869 Revisions Next

r33216 Wednesday 5th November, 2014 at 12:27:17 UTC by hap
get rid of old printfs
[src/emu/cpu/tms0980]tms0980.c

trunk/src/emu/cpu/tms0980/tms0980.c
r241727r241728
123123#include "debugger.h"
124124#include "tms0980.h"
125125
126#define LOG                 0
127126
128127
129128const device_type TMS0980 = &device_creator<tms0980_cpu_device>;
r241727r241728
236235#define I_YNEC      ( MICRO_MASK | M_YTP | M_CKN | M_NE )
237236
238237
239static const UINT8 tms0980_c2_value[4] =
240{
241   0x00, 0x02, 0x01, 0x03
242};
243static const UINT8 tms0980_c3_value[8] =
244{
245   0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07
246};
247static const UINT8 tms0980_c4_value[16] =
248{
249   0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x0F
250};
238static const UINT8 tms0980_c2_value[4] = { 0, 2, 1, 3 };
239static const UINT8 tms0980_c3_value[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
240static const UINT8 tms0980_c4_value[16] = { 0x0, 0x8, 0x4, 0xC, 0x2, 0xA, 0x6, 0xE, 0x1, 0x9, 0x5, 0xD, 0x3, 0xB, 0x7, 0xF };
251241static const UINT8 tms0980_bit_value[4] = { 1, 4, 2, 8 };
252static const UINT8 tms0980_nbit_value[4] = { 0x0E, 0x0B, 0x0D, 0x07 };
242static const UINT8 tms0980_nbit_value[4] = { 0xE, 0xB, 0xD, 0x7 };
253243
254244
255245static const UINT32 tms0980_decode[512] =
r241727r241728
329319};
330320
331321
332static const UINT32 tms1000_default_decode[256] = {
322static const UINT32 tms1000_default_decode[256] =
323{
333324   /* 0x00 */
334325   F_COMX, I_A8AAC, I_YNEA, I_TAM, I_TAMZA, I_A10AAC, I_A6AAC, I_DAN,
335326   I_TKA, I_KNEZ, F_TDO, F_CLO, F_RSTR, F_SETR, I_IA, F_RETN,
r241727r241728
371362};
372363
373364
374static const UINT32 tms1100_default_decode[256] = {
365static const UINT32 tms1100_default_decode[256] =
366{
375367   /* 0x00 */
376368   I_MNEA, I_ALEM, I_YNEA, I_XMA, I_DYN, I_IYC, I_AMAAC, I_DMAN,
377369   I_TKA, F_COMX, F_TDO, F_COMC, F_RSTR, F_SETR, I_KNEZ, F_RETN,
r241727r241728
504496
505497void tms1xxx_cpu_device::device_reset()
506498{
507   m_pa = 0x0F;
508   m_pb = 0x0F;
499   m_pa = 0xF;
500   m_pb = 0xF;
509501   m_pc = 0;
510502   m_dam = 0;
511503   m_ca = 0;
r241727r241728
620612                 ( pc{5:4} == 11 && pc{0} == 1 ) => 10
621613
622614*/
623static const UINT8 tms1000_next_pc[64] = {
615static const UINT8 tms1000_next_pc[64] =
616{
624617   0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F,
625618   0x20, 0x22, 0x24, 0x26, 0x28, 0x2A, 0x2C, 0x2E, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3A, 0x3C, 0x3F,
626619   0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E,
r241727r241728
711704{
712705   do
713706   {
714//      debugger_instruction_hook( this, ( ( m_pa << m_pc_size ) | m_pc ) << 1 );
715707      m_icount--;
716708      switch( m_subcycle )
717709      {
r241727r241728
811803            }
812804            if ( m_decode & M_STO )
813805            {
814//printf("write ram %02x data %01x\n", m_ram_address, m_a );
815806               m_data->write_byte( m_ram_address, m_a );
816807            }
817808            if ( m_decode & M_CKM )
818809            {
819//printf("write ram %02x data %01x\n", m_ram_address, m_cki_bus );
820810               m_data->write_byte( m_ram_address, m_cki_bus );
821811            }
822812         }
r241727r241728
824814         {
825815            if ( m_decode & F_SBIT )
826816            {
827//printf("write ram %02x data %01x\n", m_ram_address, m_ram_data | tms0980_bit_value[ m_opcode & 0x03 ] );
828817               m_data->write_byte( m_ram_address, m_ram_data | tms0980_bit_value[ m_opcode & 0x03 ] );
829818            }
830819            if ( m_decode & F_RBIT )
831820            {
832//printf("write ram %02x data %01x\n", m_ram_address, m_ram_data & tms0980_nbit_value[ m_opcode & 0x03 ] );
833821               m_data->write_byte( m_ram_address, m_ram_data & tms0980_nbit_value[ m_opcode & 0x03 ] );
834822            }
835823            if ( m_decode & F_SETR )
r241727r241728
850838               {
851839                  logerror("unknown output pla mapping for status latch = %d and a = %X\n", m_status_latch, m_a);
852840               }
853//if ( ( c_output_pla[ ( m_status_latch << 4 ) | m_a ] & 0xFF00 ) == 0xFF00 )
854//printf("****** o output m_status_latch = %X, m_a = %X\n", m_status_latch, m_a);
855//else
856//printf("o output m_status_latch = %X, m_a = %X\n", m_status_latch, m_a);
857841
858842               m_write_o( 0, m_o & m_o_mask, 0xffff );
859843            }
r241727r241728
951935            m_opcode = m_program->read_byte( m_rom_address );
952936         }
953937         next_pc();
954         if (LOG)
955            logerror( "tms0980: read opcode %04x from %04x. Set pc to %04x\n", m_opcode, m_rom_address, m_pc );
956938
957939         /* ram address */
958940         m_ram_address = ( m_x << 4 ) | m_y;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team