Previous 199869 Revisions Next

r19183 Wednesday 28th November, 2012 at 04:27:10 UTC by R. Belmont
h8 updates: [R. Belmont]
- Preliminary H8S/2655 support
- Fixed so RTE doesn't allow the PC to go outside the address space
- Supported additional forms of BTST and BSET
- Removed incorrect halt on BVC/BVS instructions
[src/emu/cpu/h83002]h8.h h8_16.c h8disasm.c h8ops.h h8priv.h h8speriph.c

trunk/src/emu/cpu/h83002/h8disasm.c
r19182r19183
12751275         sprintf(buffer, "%4.4x mov.b @%x, %s", opcode, data16, reg_names8[opcode & 0xf]);
12761276         size = 4;
12771277         break;
1278      case 0x1:
1279         data32=h8_mem_read16(2);
1280         if (data32 & 0x8000)
1281         {
1282            data32 |= 0xffff0000;
1283         }
1284         data16=h8_mem_read16(4);
1285         if ((data16 & 0xff00) == 0x7300)
1286         {
1287            sprintf(buffer, "%4.4x btst #%d, @%8.8x", opcode, (data16 >> 4) & 7, data32 & addr_mask);
1288         }
1289         else if ((data16 & 0xff0f) == 0x7000)
1290         {
1291            sprintf(buffer, "%4.4x bset #%d, @%8.8x", opcode, (data16 >> 4) & 7, data32 & addr_mask);
1292         }
1293         else if ((data16 & 0xff00) == 0x6300)
1294         {
1295            sprintf(buffer, "%4.4x btst %s, @%8.8x", opcode, reg_names8[(data16 >> 4) & 0xf], data32 & addr_mask);
1296         }
1297         else if ((data16 & 0xff0f) == 0x6000)
1298         {
1299            sprintf(buffer, "%4.4x bset %s, @%8.8x", opcode, reg_names8[(data16 >> 4) & 0xf], data32 & addr_mask);
1300         }
1301         else
1302         {
1303            sprintf(buffer, "%4.4x ???", opcode);
1304         }       
1305         size = 6;           
1306         break;
12781307      case 0x2:
12791308         data32=h8_mem_read32(2);
12801309         sprintf(buffer, "%4.4x mov.b @%8.8x, %s", opcode, data32&addr_mask, reg_names8[opcode & 0xf]);
trunk/src/emu/cpu/h83002/h8.h
r19182r19183
11/***************************************************************************
22
3 h83002.h : Public constants and function defs for the H8/3002 emulator.
3 h8.h : Public constants and function defs for the H8/300, H8/300H,
4      H8/2000S, and H8/2600S family emulators.
45
56****************************************************************************/
67
78#pragma once
89
9#ifndef __H83002_H__
10#define __H83002_H__
10#ifndef __H8SERIES_H__
11#define __H8SERIES_H__
1112
1213
1314#define IFLAG  0x80
r19182r19183
121122#define H8S_IO_ICRB   H8S_IO(0xFEC1)
122123#define H8S_IO_ICRC   H8S_IO(0xFEC2)
123124
125#define H8S_IO_ISCRH  H8S_IO(0xFF2C)
126#define H8S_IO_ISCRL  H8S_IO(0xFF2D)
127
124128// for H8S/2394
125129#define H8S_IO_IER    H8S_IO(0xFF2E)
126130#define H8S_IO_IFR    H8S_IO(0xFF2F)
r19182r19183
133137#define H8S_IO_DTCEE  H8S_IO(0xFF34)
134138#define H8S_IO_DTCEF  H8S_IO(0xFF35)
135139
140#define H8S_IO_SYSCR  H8S_IO(0xFF39)
141
136142// port read registers
137143#define H8S_IO_PORT1  H8S_IO(0xFF50)
138144#define H8S_IO_PORT2  H8S_IO(0xFF51)
r19182r19183
185191#define H8S_IO_SSR2   H8S_IO(0xFF8C)
186192#define H8S_IO_RDR2   H8S_IO(0xFF8D)
187193#define H8S_IO_SCMR2  H8S_IO(0xFF8E)
194
195// ADC
196#define H8S_IO_ADCSR  H8S_IO(0xFFA0)
197#define H8S_IO_ADCR   H8S_IO(0xFFA1)
198
188199// 8-bit timer (channel 0 & 1)
189200#define H8S_IO_TCR0   H8S_IO(0xFFB0)
190201#define H8S_IO_TCR1   H8S_IO(0xFFB1)
r19182r19183
295306#define H8S_IO_DMABCRH H8S_IO(0xFF06)
296307#define H8S_IO_DMABCRL H8S_IO(0xFF07)
297308
309#define H8S_IO_ADCSR   H8S_IO(0xFFA0)
310
298311///////////
299312// PORTS //
300313///////////
r19182r19183
417430DECLARE_LEGACY_CPU_DEVICE(H8S2246, h8s_2246);
418431DECLARE_LEGACY_CPU_DEVICE(H8S2323, h8s_2323);
419432DECLARE_LEGACY_CPU_DEVICE(H8S2394, h8s_2394);
433DECLARE_LEGACY_CPU_DEVICE(H8S2655, h8s_2655);
420434
421#endif /* __H83002_H__ */
435#endif /* __H8SERIES_H__ */
trunk/src/emu/cpu/h83002/h8priv.h
r19182r19183
7676   H8S2XXX_TPU tpu[6];
7777   H8S2XXX_SCI sci[3];
7878
79    int tpu_max;
80
7981    UINT8 ddrs[H8_MAX_PORTS], drs[H8_MAX_PORTS], pcrs[H8_MAX_PORTS], odrs[H8_MAX_PORTS];
8082
8183   int mode_8bit;
r19182r19183
122124UINT8 h8s2246_per_regs_read_8(h83xx_state *h8, int offset);
123125UINT8 h8s2323_per_regs_read_8(h83xx_state *h8, int offset);
124126UINT8 h8s2394_per_regs_read_8(h83xx_state *h8, int offset);
127UINT8 h8s2655_per_regs_read_8(h83xx_state *h8, int offset);
125128
126129UINT16 h8s2241_per_regs_read_16(h83xx_state *h8, int offset);
127130UINT16 h8s2246_per_regs_read_16(h83xx_state *h8, int offset);
128131UINT16 h8s2323_per_regs_read_16(h83xx_state *h8, int offset);
129132UINT16 h8s2394_per_regs_read_16(h83xx_state *h8, int offset);
133UINT16 h8s2655_per_regs_read_16(h83xx_state *h8, int offset);
130134
131135void h8s2241_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data);
132136void h8s2246_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data);
133137void h8s2323_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data);
134138void h8s2394_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data);
139void h8s2655_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data);
135140
136141void h8s2241_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data);
137142void h8s2246_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data);
138143void h8s2323_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data);
139144void h8s2394_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data);
145void h8s2655_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data);
140146
141147#endif /* __H8PRIV_H__ */
trunk/src/emu/cpu/h83002/h8_16.c
r19182r19183
723723   }
724724}
725725
726static WRITE16_HANDLER( h8s2655_per_regs_w )
727{
728   h83xx_state *h8 = get_safe_token(&space.device());
729   if (mem_mask == 0xffff)
730   {
731      h8s2655_per_regs_write_16(h8, (offset << 1), data);
732   }
733   else if (mem_mask & 0xff00)
734   {
735      h8s2655_per_regs_write_8(h8, (offset << 1), (data >> 8) & 0xff);
736   }
737   else if (mem_mask == 0x00ff)
738   {
739      h8s2655_per_regs_write_8(h8, (offset << 1) + 1, data & 0xff);
740   }
741}
742
726743static READ16_HANDLER( h8s2241_per_regs_r )
727744{
728745   h83xx_state *h8 = get_safe_token(&space.device());
r19182r19183
795812   return 0;
796813}
797814
815static READ16_HANDLER( h8s2655_per_regs_r )
816{
817   h83xx_state *h8 = get_safe_token(&space.device());
818   if (mem_mask == 0xffff)
819   {
820      return h8s2655_per_regs_read_16(h8, (offset << 1));
821   }
822   else if (mem_mask == 0xff00)
823   {
824      return h8s2655_per_regs_read_8(h8, (offset << 1)) << 8;
825   }
826   else if (mem_mask == 0x00ff)
827   {
828      return h8s2655_per_regs_read_8(h8, (offset << 1) + 1);
829   }
830   return 0;
831}
832
798833// On-board RAM and peripherals
799834static ADDRESS_MAP_START( h8_3002_internal_map, AS_PROGRAM, 16, legacy_cpu_device )
800835   // 512B RAM
r19182r19183
835870   AM_RANGE( 0xFFFE40, 0xFFFFFF ) AM_READWRITE_LEGACY( h8s2394_per_regs_r, h8s2394_per_regs_w ) // internal i/o registers
836871ADDRESS_MAP_END
837872
873static ADDRESS_MAP_START( h8s_2655_internal_map, AS_PROGRAM, 16, legacy_cpu_device )
874   AM_RANGE( 0xFFEC00, 0xFFFBFF ) AM_RAM // on-chip ram
875   AM_RANGE( 0xFFFE40, 0xFFFFFF ) AM_READWRITE_LEGACY( h8s2655_per_regs_r, h8s2655_per_regs_w ) // internal i/o registers
876ADDRESS_MAP_END
877
838878CPU_GET_INFO( h8_3002 )
839879{
840880   h83xx_state *h8 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
r19182r19183
9891029   }
9901030}
9911031
1032CPU_GET_INFO( h8s_2655 )
1033{
1034   switch (state)
1035   {
1036      case CPUINFO_PTR_INTERNAL_MEMORY_MAP + AS_PROGRAM: info->internal_map16 = ADDRESS_MAP_NAME(h8s_2655_internal_map);  break;
1037        case CPUINFO_FCT_SET_INFO:         info->setinfo = CPU_SET_INFO_NAME(h8s_2394);      break;
1038      case CPUINFO_FCT_INIT:            info->init = CPU_INIT_NAME(h8s_2xxx);      break;
1039      case CPUINFO_FCT_RESET:            info->reset= CPU_RESET_NAME(h8s_2xxx);         break;
1040      case CPUINFO_STR_NAME:            strcpy(info->s, "H8S/2655");      break;
1041      default:
1042         CPU_GET_INFO_CALL(h8_3002);
1043   }
1044}
1045
9921046DEFINE_LEGACY_CPU_DEVICE(H83002, h8_3002);
9931047DEFINE_LEGACY_CPU_DEVICE(H83007, h8_3007);
9941048DEFINE_LEGACY_CPU_DEVICE(H83044, h8_3044);
r19182r19183
9971051DEFINE_LEGACY_CPU_DEVICE(H8S2246, h8s_2246);
9981052DEFINE_LEGACY_CPU_DEVICE(H8S2323, h8s_2323);
9991053DEFINE_LEGACY_CPU_DEVICE(H8S2394, h8s_2394);
1054DEFINE_LEGACY_CPU_DEVICE(H8S2655, h8s_2655);
10001055
trunk/src/emu/cpu/h83002/h8ops.h
r19182r19183
1/*
2
3H8/3xx: Unknown opcode (PC=1c966) 10f - not a valid H8 or H8S opcode, either bad dump or banked ROM
4maygayep.c  ep_cfallc
5
6H8/3xx: Unknown opcode (PC=6bfffefe) 230 - STMAC
7coinmvga.c  cmkenosp
8
9H8/3xx: Unknown opcode (PC=67fffefe) 230 - STMAC
10coinmvga.c  cmkenospa
11
12H8/3xx: Unknown opcode (PC=8f91) aeb - ADD.L ERs, ERd
13maygayep.c  ep_hogmnc
14
15H8/3xx: Unknown opcode (PC=20000) 6b6e - MOV.B @ERs, Rd
16maygayep.c  ep_wordf
17
18*/
19
201static UINT32 udata32, address24;
212static INT32 sdata32;
223static UINT16 udata16, ext16;
r19182r19183
16901671            h8_setreg32(h8, H8_SP, h8_getreg32(h8, H8_SP)+4);
16911672
16921673            // extended mode
1693            h8->pc = udata32;
1674            h8->pc = udata32 & H8_ADDR_MASK;
16941675         }
16951676         // must do this last, because set_ccr() does a check_irq()
16961677         h8_set_ccr(h8, udata8);
r19182r19183
19101891         H8_IFETCH_TIMING(1);
19111892         H8_BYTE_TIMING(1, address24);
19121893         break;
1894      case 0x1:   // btst #xx, @aa:16 or btst Rn, @aa:16
1895         sdata16 = h8_mem_read16(h8, h8->pc);
1896         h8->pc += 2;
1897         address24 = sdata16 & H8_ADDR_MASK;
1898         udata16 = h8_mem_read16(h8, h8->pc);
1899         h8->pc += 2;
1900         udata8 = h8_mem_read8(address24);
1901         if ((udata16 & 0xff00) == 0x7300)
1902         {
1903            h8_btst8(h8, (udata16 >> 4) & 0x7, udata8);
1904            h8_mem_write8(address24, udata8);
1905         }
1906         else if ((udata16 & 0xff0f) == 0x7000)
1907         {
1908            h8_bset8(h8, (udata16 >> 4) & 0x7, udata8);
1909            h8_mem_write8(address24, udata8);
1910         }
1911         else if ((udata16 & 0xff00) == 0x6300)
1912         {
1913            h8_btst8(h8, h8_getreg8(h8, (udata16 >> 4) & 0xf), udata8);
1914            h8_mem_write8(address24, udata8);
1915         }
1916         else if ((udata16 & 0xff0f) == 0x6000)
1917         {
1918            h8_bset8(h8, h8_getreg8(h8, (udata16 >> 4) & 0xf), udata8);
1919            h8_mem_write8(address24, udata8);
1920         }
1921         else
1922         {
1923            h8->h8err = 1;
1924         }
1925         H8_IFETCH_TIMING(3);
1926         H8_BYTE_TIMING(1, address24);
1927         break;
19131928      case 0x2:
19141929         address24=h8_mem_read32(h8, h8->pc);
19151930         h8->pc += 4;
r19182r19183
42194234      if(h8->h8zflag == 1)taken = 1;
42204235      break;
42214236   case 8: // bvc V = 0
4222      h8->h8err = 1;
42234237      if(h8->h8vflag == 0)taken = 1;
42244238      break;
42254239   case 9: // bvs V = 1
4226      h8->h8err = 1;
42274240      if(h8->h8vflag == 1)taken = 1;
42284241      break;
42294242   case 0xa: // bpl N = 0
trunk/src/emu/cpu/h83002/h8speriph.c
r19182r19183
88    H8S/2246
99    H8S/2323
1010    H8S/2394
11    H8S/2655
1112*/
1213
1314#include "emu.h"
r19182r19183
404405
405406void h8s_periph_reset(h83xx_state *h8)
406407{
407   const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) ? 6 : 3;
408   int tpu_max = h8->tpu_max;
409   h8->tpu_max = tpu_max;
408410   if ((h8->device->type() == H8S2241) || (h8->device->type() == H8S2246))
409411   {
410412      memcpy( h8->per_regs, H8S_RESET_H8S_IO_224x, sizeof( h8->per_regs));
411413   }
412   else if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394))
414   else if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655))
413415   {
414416      memcpy( h8->per_regs, H8S_RESET_H8S_IO_2323, sizeof( h8->per_regs));
415417   }
416418   for (int i = 0; i < 2; i++) h8s_tmr_x_reset( h8, i);
417   for (int i = 0; i < tpu_max; i++) h8s_tpu_x_reset( h8, i);
419   for (int i = 0; i < tpu_max; i++) h8s_tpu_x_reset( h8, i );
418420}
419421
420422/////////////////
r19182r19183
659661
660662void h8s_tpu_init(h83xx_state *h8)
661663{
662   const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) ? 6 : 3;
664   const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655)) ? 6 : 3;
663665   for (int i = 0; i < tpu_max; i++)
664666   {
665667      h8->tpu[i].timer = h8->device->machine().scheduler().timer_alloc(FUNC(h8s_tpu_callback), h8);
r19182r19183
11281130
11291131void h8s_tpu_write_tstr( h83xx_state *h8, UINT8 data)
11301132{
1131   const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) ? 6 : 3;
1133   const int tpu_max = h8->tpu_max;
11321134   UINT8 old_data = h8->per_regs[H8S_IO_TSTR];
11331135   int i;
11341136   h8->per_regs[H8S_IO_TSTR] = data;
r19182r19183
13451347      case H8S_IO_DMABCRL :
13461348      {
13471349         h8->per_regs[offset] = data;
1348         if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394))
1350         if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655))
13491351         {
13501352            if ((data & 0x40) && (data & 0x80))
13511353            {
r19182r19183
14281430            break;
14291431
14301432      // ...
1431        #if 0
14321433        // TPU
14331434      case H8S_IO_TSTR  : h8s_tpu_write_tstr( h8, data); break;
14341435      // DMA
14351436      case H8S_IO_DMABCRL :
14361437      {
14371438         h8->per_regs[offset] = data;
1438         if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394))
1439         if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655))
14391440         {
14401441            if ((data & 0x40) && (data & 0x80))
14411442            {
r19182r19183
14581459         }
14591460      }
14601461      break;
1461        #endif
14621462      // ...
14631463      default :
14641464      {
1465            logerror("H8S: Unknown write %02x to I/O %x\n", data, offset);
14661465         h8->per_regs[offset] = data;
14671466      }
14681467      break;
r19182r19183
14891488      case H8S_IO_TGR2A_H : h8s_tpu_x_write_tgra( h8, 2, data); break;
14901489      case H8S_IO_TGR2B_H : h8s_tpu_x_write_tgrb( h8, 2, data); break;
14911490      // TPU 3
1492      case H8S_IO_TCNT3_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tcnt( h8, 3, data); break;
1493      case H8S_IO_TGR3A_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgra( h8, 3, data); break;
1494      case H8S_IO_TGR3B_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgrb( h8, 3, data); break;
1495      case H8S_IO_TGR3C_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgrc( h8, 3, data); break;
1496      case H8S_IO_TGR3D_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgrd( h8, 3, data); break;
1491      case H8S_IO_TCNT3_H : if (h8->tpu_max == 6) h8s_tpu_x_write_tcnt( h8, 3, data); break;
1492      case H8S_IO_TGR3A_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgra( h8, 3, data); break;
1493      case H8S_IO_TGR3B_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgrb( h8, 3, data); break;
1494      case H8S_IO_TGR3C_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgrc( h8, 3, data); break;
1495      case H8S_IO_TGR3D_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgrd( h8, 3, data); break;
14971496      // TPU 4
1498      case H8S_IO_TCNT4_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tcnt( h8, 4, data); break;
1499      case H8S_IO_TGR4A_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgra( h8, 4, data); break;
1500      case H8S_IO_TGR4B_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgrb( h8, 4, data); break;
1497      case H8S_IO_TCNT4_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tcnt( h8, 4, data); break;
1498      case H8S_IO_TGR4A_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgra( h8, 4, data); break;
1499      case H8S_IO_TGR4B_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgrb( h8, 4, data); break;
15011500      // TPU 5
1502      case H8S_IO_TCNT5_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tcnt( h8, 5, data); break;
1503      case H8S_IO_TGR5A_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgra( h8, 5, data); break;
1504      case H8S_IO_TGR5B_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) h8s_tpu_x_write_tgrb( h8, 5, data); break;
1501      case H8S_IO_TCNT5_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tcnt( h8, 5, data); break;
1502      case H8S_IO_TGR5A_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgra( h8, 5, data); break;
1503      case H8S_IO_TGR5B_H : if (h8->tpu_max == 6 ) h8s_tpu_x_write_tgrb( h8, 5, data); break;
15051504      // ...
15061505      default :
15071506      {
r19182r19183
15951594            }
15961595            break;
15971596
1598        #if 0
1597      // ADCSR
1598      case H8S_IO_ADCSR:   data = ADCSR_ADF; break;
1599
15991600        // TMR 0
16001601      case H8S_IO_TCNT0 : data = h8s_tmr_x_read_tcnt( h8, 0); break;
16011602      // TMR 1
16021603      case H8S_IO_TCNT1 : data = h8s_tmr_x_read_tcnt( h8, 1); break;
1603        #endif
16041604      // ...
16051605      // default
1606      default : data = h8->per_regs[offset]; logerror("H8S: unhandled I/O read at %x\n", offset); break;
1606      default : data = h8->per_regs[offset]; logerror("H8S: possibly unhandled I/O read at %x (PC=%x)\n", offset, h8->ppc); break;
16071607   }
16081608   verboselog( h8->device->machine(), 9, "%08X | %08X -> %02X\n", h8->ppc, H8S_IO_ADDR(offset), data);
16091609   return data;
r19182r19183
16171617      case H8S_IO_TCNT0_H : data = h8s_tpu_x_read_tcnt( h8, 0); break;
16181618      case H8S_IO_TCNT1_H : data = h8s_tpu_x_read_tcnt( h8, 1); break;
16191619      case H8S_IO_TCNT2_H : data = h8s_tpu_x_read_tcnt( h8, 2); break;
1620      case H8S_IO_TCNT3_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) data = h8s_tpu_x_read_tcnt( h8, 3); break;
1621      case H8S_IO_TCNT4_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) data = h8s_tpu_x_read_tcnt( h8, 4); break;
1622      case H8S_IO_TCNT5_H : if ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394)) data = h8s_tpu_x_read_tcnt( h8, 5); break;
1620      case H8S_IO_TCNT3_H : if (h8->tpu_max == 6) data = h8s_tpu_x_read_tcnt( h8, 3); break;
1621      case H8S_IO_TCNT4_H : if (h8->tpu_max == 6) data = h8s_tpu_x_read_tcnt( h8, 4); break;
1622      case H8S_IO_TCNT5_H : if (h8->tpu_max == 6) data = h8s_tpu_x_read_tcnt( h8, 5); break;
16231623      default :
16241624      {
16251625         UINT8 b[2];
r19182r19183
17131713   return h8s_onchip_reg_read_16(h8, offset);
17141714}
17151715
1716void h8s2655_per_regs_write_8(h83xx_state *h8, int offset, UINT8 data)
1717{
1718   h8s_onchip_reg_write_8_ddr(h8, offset, data);
1719}
17161720
1721UINT8 h8s2655_per_regs_read_8(h83xx_state *h8, int offset)
1722{
1723   return h8s_onchip_reg_read_8_ddr(h8, offset);
1724}
1725
1726void h8s2655_per_regs_write_16(h83xx_state *h8, int offset, UINT16 data)
1727{
1728   h8s_onchip_reg_write_16(h8, offset, data);
1729}
1730
1731UINT16 h8s2655_per_regs_read_16(h83xx_state *h8, int offset)
1732{
1733   return h8s_onchip_reg_read_16(h8, offset);
1734}
1735

Previous 199869 Revisions Next


© 1997-2024 The MAME Team