Previous 15994 Revisions Next

r6220 Friday 30th October, 2009 at 14:17:46 UTC by Curt Coder
[KYOCERA] Renamed olivm10 to m10, simplified HD44102 interface, and converted HD61830 to use an internal address space for video RAM.
[src/mess]messdriv.c
[src/mess/drivers]kyocera.c
[src/mess/includes]kyocera.h
[src/mess/video]hd44102.c hd44102.h hd61830.c hd61830.h kyocera.c

src/mess/video/hd44102.c
r6219r6220
5353   UINT8 status;               /* status register */
5454   UINT8 output;               /* output register */
5555
56   int cs2;                  /* chip select */
5657   int page;                  /* display start page */
5758   int x;                     /* X address */
5859   int y;                     /* Y address */
r6219r6220
8485    hd44102_status_r - status read
8586-------------------------------------------------*/
8687
87READ8_DEVICE_HANDLER( hd44102_status_r )
88static READ8_DEVICE_HANDLER( hd44102_status_r )
8889{
8990   hd44102_t *hd44102 = get_safe_token(device);
9091
r6219r6220
9596    hd44102_control_w - control write
9697-------------------------------------------------*/
9798
98WRITE8_DEVICE_HANDLER( hd44102_control_w )
99static WRITE8_DEVICE_HANDLER( hd44102_control_w )
99100{
100101   hd44102_t *hd44102 = get_safe_token(device);
101102
r6219r6220
173174    hd44102_data_r - data read
174175-------------------------------------------------*/
175176
176READ8_DEVICE_HANDLER( hd44102_data_r )
177static READ8_DEVICE_HANDLER( hd44102_data_r )
177178{
178179   hd44102_t *hd44102 = get_safe_token(device);
179180
r6219r6220
190191    hd44102_data_w - data write
191192-------------------------------------------------*/
192193
193WRITE8_DEVICE_HANDLER( hd44102_data_w )
194static WRITE8_DEVICE_HANDLER( hd44102_data_w )
194195{
195196   hd44102_t *hd44102 = get_safe_token(device);
196197
r6219r6220
235236}
236237
237238/*-------------------------------------------------
239    hd44102_cs2_w - chip select write
240-------------------------------------------------*/
241
242WRITE_LINE_DEVICE_HANDLER( hd44102_cs2_w )
243{
244   hd44102_t *hd44102 = get_safe_token(device);
245
246   hd44102->cs2 = state;
247}
248
249/*-------------------------------------------------
250    hd44102_r - register read
251-------------------------------------------------*/
252
253READ8_DEVICE_HANDLER( hd44102_r )
254{
255   hd44102_t *hd44102 = get_safe_token(device);
256   UINT8 data = 0;
257
258   if (hd44102->cs2)
259   {
260      data = (offset & 0x01) ? hd44102_data_r(device, offset) : hd44102_status_r(device, offset);
261   }
262
263   return data;
264}
265
266/*-------------------------------------------------
267    hd44102_w - register write
268-------------------------------------------------*/
269
270WRITE8_DEVICE_HANDLER( hd44102_w )
271{
272   hd44102_t *hd44102 = get_safe_token(device);
273
274   if (hd44102->cs2)
275   {
276      (offset & 0x01) ? hd44102_data_w(device, offset, data) : hd44102_control_w(device, offset, data);
277   }
278}
279
280/*-------------------------------------------------
238281    DEVICE_START( hd44102 )
239282-------------------------------------------------*/
240283
r6219r6220
248291   assert(hd44102->screen != NULL);
249292
250293   /* register for state saving */
294   state_save_register_device_item(device, 0, hd44102->cs2);
251295   state_save_register_device_item(device, 0, hd44102->status);
252296   state_save_register_device_item(device, 0, hd44102->output);
253297   state_save_register_device_item(device, 0, hd44102->page);
src/mess/video/hd44102.h
r6219r6220
4545/* device interface */
4646DEVICE_GET_INFO( hd44102 );
4747
48/* chip select */
49WRITE_LINE_DEVICE_HANDLER( hd44102_cs2_w );
50
4851/* register access */
49READ8_DEVICE_HANDLER( hd44102_status_r );
50WRITE8_DEVICE_HANDLER( hd44102_control_w );
52READ8_DEVICE_HANDLER( hd44102_r );
53WRITE8_DEVICE_HANDLER( hd44102_w );
5154
52/* memory access */
53READ8_DEVICE_HANDLER( hd44102_data_r );
54WRITE8_DEVICE_HANDLER( hd44102_data_w );
55
5655/* screen update */
5756void hd44102_update(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect);
5857
src/mess/video/kyocera.c
r6219r6220
33#include "video/hd44102.h"
44#include "video/hd61830.h"
55
6
7READ8_HANDLER( kc85_lcd_status_r )
8{
9   kc85_state *state = space->machine->driver_data;
10
11   UINT8 data = 0;
12   int i;
13
14   for (i = 0; i < 10; i++)
15   {
16      if (state->lcd_cs2[i])
17      {
18         data |= hd44102_status_r(state->hd44102[i], 0);
19      }
20   }
21
22   return data;
23}
24
25READ8_HANDLER( kc85_lcd_data_r )
26{
27   kc85_state *state = space->machine->driver_data;
28   UINT8 data = 0;
29   int i;
30
31   for (i = 0; i < 10; i++)
32   {
33      if (state->lcd_cs2[i])
34      {
35         data |= hd44102_data_r(state->hd44102[i], 0);
36      }
37   }
38
39   return data;
40}
41
42WRITE8_HANDLER( kc85_lcd_command_w )
43{
44   kc85_state *state = space->machine->driver_data;
45   int i;
46
47   for (i = 0; i < 10; i++)
48   {
49      if (state->lcd_cs2[i])
50      {
51         hd44102_control_w(state->hd44102[i], 0, data);
52      }
53   }
54}
55
56WRITE8_HANDLER( kc85_lcd_data_w )
57{
58   kc85_state *state = space->machine->driver_data;
59   int i;
60
61   for (i = 0; i < 10; i++)
62   {
63      if (state->lcd_cs2[i])
64      {
65         hd44102_data_w(state->hd44102[i], 0, data);
66      }
67   }
68}
69
706static PALETTE_INIT( kc85 )
717{
728   palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
r6219r6220
8824   state->hd44102[7] = devtag_get_device(machine, "m8");
8925   state->hd44102[8] = devtag_get_device(machine, "m9");
9026   state->hd44102[9] = devtag_get_device(machine, "m10");
91
92   /* register for state saving */
93   state_save_register_global_array(machine, state->lcd_cs2);
9427}
9528
9629static VIDEO_UPDATE( kc85 )
9730{
9831   kc85_state *state = screen->machine->driver_data;
99
10032   int i;
10133
10234   for (i = 0; i < 10; i++)
r6219r6220
11345
11446   /* find devices */
11547   state->hd61830 = devtag_get_device(machine, HD61830_TAG);
116
117   /* allocate video memory */
118   state->video_ram = auto_alloc_array(machine, UINT8, TANDY200_VIDEORAM_SIZE);
119
120   /* register for state saving */
121   state_save_register_global_pointer(machine, state->video_ram, TANDY200_VIDEORAM_SIZE);
12248}
12349
12450static VIDEO_UPDATE( tandy200 )
r6219r6220
13056   return 0;
13157}
13258
133static READ8_HANDLER( tandy200_rd_r )
134{
135   tandy200_state *state = space->machine->driver_data;
136
137   return state->video_ram[offset & TANDY200_VIDEORAM_MASK];
138}
139
140static WRITE8_HANDLER( tandy200_rd_w )
141{
142   tandy200_state *state = space->machine->driver_data;
143
144   state->video_ram[offset & TANDY200_VIDEORAM_MASK] = data;
145}
146
147static HD61830_INTERFACE( tandy200_hd61830_intf )
148{
149   SCREEN_TAG,
150   DEVCB_MEMORY_HANDLER(I8085_TAG, PROGRAM, tandy200_rd_r),
151   DEVCB_MEMORY_HANDLER(I8085_TAG, PROGRAM, tandy200_rd_w)
152};
153
15459MACHINE_DRIVER_START( kc85_video )
15560   MDRV_SCREEN_ADD(SCREEN_TAG, LCD)
15661   MDRV_SCREEN_REFRESH_RATE(44)
r6219r6220
196101   MDRV_VIDEO_START(tandy200)
197102   MDRV_VIDEO_UPDATE(tandy200)
198103
199   MDRV_HD61830_ADD(HD61830_TAG, XTAL_4_9152MHz/2/2, tandy200_hd61830_intf)
104   MDRV_HD61830_ADD(HD61830_TAG, XTAL_4_9152MHz/2/2, SCREEN_TAG)
200105MACHINE_DRIVER_END
src/mess/video/hd61830.c
r6219r6220
1111
1212    TODO:
1313
14   - external ROM
1415    - text mode
1516
1617*/
r6219r6220
5960typedef struct _hd61830_t hd61830_t;
6061struct _hd61830_t
6162{
62   devcb_resolved_read8      in_rd_func;
63   devcb_resolved_write8      out_rd_func;
64
6563   int bf;                  /* busy flag */
6664
6765   UINT8 ir;               /* instruction register */
r6219r6220
9593   return (hd61830_t *)device->token;
9694}
9795
98INLINE const hd61830_interface *get_interface(const device_config *device)
96INLINE hd61830_config *get_safe_config(const device_config *device)
9997{
10098   assert(device != NULL);
101   assert((device->type == HD61830));
102   return (const hd61830_interface *) device->static_config;
99   assert(device->type == HD61830);
100   return (hd61830_config *)device->inline_config;
103101}
104102
105103/***************************************************************************
r6219r6220
137135    hd61830_status_r - status read
138136-------------------------------------------------*/
139137
140READ8_DEVICE_HANDLER( hd61830_status_r )
138static READ8_DEVICE_HANDLER( hd61830_status_r )
141139{
142140   hd61830_t *hd61830 = get_safe_token(device);
143141
r6219r6220
150148    hd61830_control_w - control write
151149-------------------------------------------------*/
152150
153WRITE8_DEVICE_HANDLER( hd61830_control_w )
151static WRITE8_DEVICE_HANDLER( hd61830_control_w )
154152{
155153   hd61830_t *hd61830 = get_safe_token(device);
156154
r6219r6220
161159    hd61830_data_r - data read
162160-------------------------------------------------*/
163161
164READ8_DEVICE_HANDLER( hd61830_data_r )
162static READ8_DEVICE_HANDLER( hd61830_data_r )
165163{
166164   hd61830_t *hd61830 = get_safe_token(device);
167165
r6219r6220
169167
170168   if (LOG) logerror("HD61380 '%s' Display Data Read %02x\n", device->tag, hd61830->dor);
171169
172   hd61830->dor = devcb_call_read8(&hd61830->in_rd_func, hd61830->cac);
170   hd61830->dor = memory_read_byte(device->space[0], hd61830->cac);
173171
174172   hd61830->cac++;
175173
r6219r6220
180178    hd61830_data_w - data write
181179-------------------------------------------------*/
182180
183WRITE8_DEVICE_HANDLER( hd61830_data_w )
181static WRITE8_DEVICE_HANDLER( hd61830_data_w )
184182{
185183   hd61830_t *hd61830 = get_safe_token(device);
186184
r6219r6220
258256      break;
259257
260258   case HD61830_INSTRUCTION_DISPLAY_DATA_WRITE:
261      devcb_call_write8(&hd61830->out_rd_func, hd61830->cac, data);
259      memory_write_byte(device->space[0], hd61830->cac, data);
262260
263261      if (LOG) logerror("HD61380 '%s' Display Data Write %02x -> %04x row %u col %u\n", device->tag, data, hd61830->cac, hd61830->cac / 40, hd61830->cac % 40);
264262
r6219r6220
268266   case HD61830_INSTRUCTION_CLEAR_BIT:
269267      {
270268      int nb = data & 0x07;
271      UINT8 data = devcb_call_read8(&hd61830->in_rd_func, hd61830->cac);
269      UINT8 data = memory_read_byte(device->space[0], hd61830->cac);
272270
273271      data &= ~(2 << nb);
274272
275273      if (LOG) logerror("HD61380 '%s' Clear Bit %u at %04x\n", device->tag, nb + 1, hd61830->cac);
276274
277      devcb_call_write8(&hd61830->out_rd_func, hd61830->cac, data);
275      memory_write_byte(device->space[0], hd61830->cac, data);
278276
279277      hd61830->cac++;
280278      }
r6219r6220
283281   case HD61830_INSTRUCTION_SET_BIT:
284282      {
285283      int nb = data & 0x07;
286      UINT8 data = devcb_call_read8(&hd61830->in_rd_func, hd61830->cac);
284      UINT8 data = memory_read_byte(device->space[0], hd61830->cac);
287285
288286      data |= 2 << nb;
289287
290288      if (LOG) logerror("HD61380 '%s' Set Bit %u at %04x\n", device->tag, nb + 1, hd61830->cac);
291289
292      devcb_call_write8(&hd61830->out_rd_func, hd61830->cac, data);
290      memory_write_byte(device->space[0], hd61830->cac, data);
293291
294292      hd61830->cac++;
295293      }
r6219r6220
308306    draw_scanline - draw one scanline
309307-------------------------------------------------*/
310308
311static void draw_scanline(hd61830_t *hd61830, bitmap_t *bitmap, const rectangle *cliprect, int y, UINT16 ra)
309static void draw_scanline(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect, int y, UINT16 ra)
312310{
311   hd61830_t *hd61830 = get_safe_token(device);
313312   int sx, x;
314313
315314   for (sx = 0; sx < hd61830->hn; sx++)
316315   {
317      UINT8 data = devcb_call_read8(&hd61830->in_rd_func, ra++);
316      UINT8 data = memory_read_byte(device->space[0], ra++);
318317
319318      for (x = 0; x < hd61830->hp; x++)
320319      {
r6219r6220
328327    update_graphics - draw graphics mode screen
329328-------------------------------------------------*/
330329
331static void update_graphics(hd61830_t *hd61830, bitmap_t *bitmap, const rectangle *cliprect)
330static void update_graphics(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect)
332331{
332   hd61830_t *hd61830 = get_safe_token(device);
333333   int y;
334334
335335   for (y = 0; y < hd61830->nx; y++)
r6219r6220
338338      UINT16 rac2 = rac1 + (hd61830->nx * hd61830->hn);
339339
340340      /* draw upper half scanline */
341      draw_scanline(hd61830, bitmap, cliprect, y, rac1);
341      draw_scanline(device, bitmap, cliprect, y, rac1);
342342
343343      /* draw lower half scanline */
344      draw_scanline(hd61830, bitmap, cliprect, y + hd61830->nx, rac2);
344      draw_scanline(device, bitmap, cliprect, y + hd61830->nx, rac2);
345345   }
346346}
347347
r6219r6220
355355
356356   if (hd61830->mcr & HD61830_MODE_GRAPHIC)
357357   {
358      update_graphics(hd61830, bitmap, cliprect);
358      update_graphics(device, bitmap, cliprect);
359359   }
360   else
361   {
362      logerror("HD61830 text mode not supported!\n");
363   }
360364}
361365
362366/*-------------------------------------------------
367    hd61830_r - register read
368-------------------------------------------------*/
369
370READ8_DEVICE_HANDLER( hd61830_r )
371{
372   return (offset & 0x01) ? hd61830_status_r(device, offset) : hd61830_data_r(device, offset);
373}
374
375/*-------------------------------------------------
376    hd61830_w - register write
377-------------------------------------------------*/
378
379WRITE8_DEVICE_HANDLER( hd61830_w )
380{
381   (offset & 0x01) ? hd61830_control_w(device, offset, data) : hd61830_data_w(device, offset, data);
382}
383
384/*-------------------------------------------------
385    ROM( hd61830 )
386-------------------------------------------------*/
387
388ROM_START( hd61830 )
389   ROM_REGION( 0x398, "hd61830", ROMREGION_LOADBYNAME )
390   ROM_LOAD( "hd61830.bin", 0x000, 0x398, NO_DUMP ) /* internal 7360-bit chargen ROM */
391ROM_END
392
393/*-------------------------------------------------
394    ADDRESS_MAP( hd61830 )
395-------------------------------------------------*/
396
397static ADDRESS_MAP_START( hd61380, 0, 8 )
398   AM_RANGE(0x0000, 0xffff) AM_RAM
399ADDRESS_MAP_END
400
401/*-------------------------------------------------
363402    DEVICE_START( hd61830 )
364403-------------------------------------------------*/
365404
366405static DEVICE_START( hd61830 )
367406{
368407   hd61830_t *hd61830 = get_safe_token(device);
369   const hd61830_interface *intf = get_interface(device);
408   const hd61830_config *config = get_safe_config(device);
370409
371   /* resolve callbacks */
372   devcb_resolve_read8(&hd61830->in_rd_func, &intf->in_rd_func, device);
373   devcb_resolve_write8(&hd61830->out_rd_func, &intf->out_rd_func, device);
374
375410   /* get the screen device */
376   hd61830->screen = devtag_get_device(device->machine, intf->screen_tag);
411   hd61830->screen = devtag_get_device(device->machine, config->screen_tag);
377412   assert(hd61830->screen != NULL);
378413
379414   /* create the busy timer */
r6219r6220
415450   {
416451      /* --- the following bits of info are returned as 64-bit signed integers --- */
417452      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(hd61830_t);                  break;
418      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                              break;
453      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = sizeof(hd61830_config);               break;
454      case DEVINFO_INT_DATABUS_WIDTH_0:            info->i = 8;                              break;
455      case DEVINFO_INT_ADDRBUS_WIDTH_0:            info->i = 16;                              break;
456      case DEVINFO_INT_ADDRBUS_SHIFT_0:            info->i = 0;                              break;
419457      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;               break;
420458
421      /* --- the following bits of info are returned as pointers to data or functions --- */
459      /* --- the following bits of info are returned as pointers --- */
460      case DEVINFO_PTR_ROM_REGION:               info->romregion = ROM_NAME(hd61830);            break;
461
462      /* --- the following bits of info are returned as pointers to data --- */
463      case DEVINFO_PTR_DEFAULT_MEMORY_MAP_0:         info->default_map8 = ADDRESS_MAP_NAME(hd61380);      break;
464     
465      /* --- the following bits of info are returned as pointers to functions --- */
422466      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(hd61830);         break;
423467      case DEVINFO_FCT_STOP:                     /* Nothing */                              break;
424468      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(hd61830);         break;
src/mess/video/hd61830.h
r6219r6220
1919
2020#define HD61830 DEVICE_GET_INFO_NAME( hd61830 )
2121
22#define MDRV_HD61830_ADD(_tag, _clock, _config) \
22#define MDRV_HD61830_ADD(_tag, _clock, _screen) \
2323   MDRV_DEVICE_ADD(_tag, HD61830, _clock) \
24   MDRV_DEVICE_CONFIG(_config)
24   MDRV_DEVICE_CONFIG_DATAPTR(hd61830_config, screen_tag, _screen)
2525
26#define HD61830_INTERFACE(name) \
27   const hd61830_interface (name) =
28
2926/***************************************************************************
3027    TYPE DEFINITIONS
3128***************************************************************************/
3229
33typedef struct _hd61830_interface hd61830_interface;
34struct _hd61830_interface
30typedef struct _hd61830_config hd61830_config;
31struct _hd61830_config
3532{
3633   const char *screen_tag;      /* screen we are acting on */
37
38   devcb_read8            in_rd_func;
39   devcb_write8         out_rd_func;
4034};
4135
4236/***************************************************************************
r6219r6220
4741DEVICE_GET_INFO( hd61830 );
4842
4943/* register access */
50READ8_DEVICE_HANDLER( hd61830_status_r );
51WRITE8_DEVICE_HANDLER( hd61830_control_w );
44READ8_DEVICE_HANDLER( hd61830_r );
45WRITE8_DEVICE_HANDLER( hd61830_w );
5246
53/* memory access */
54READ8_DEVICE_HANDLER( hd61830_data_r );
55WRITE8_DEVICE_HANDLER( hd61830_data_w );
56
5747/* screen update */
5848void hd61830_update(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect);
5949
src/mess/includes/kyocera.h
r6219r6220
1111#define CENTRONICS_TAG   "centronics"
1212
1313//#define I8085_TAG     "m19"
14//#define I8155_TAG "m12"
14//#define I8155_TAG      "m12"
1515//#define MC14412_TAG   "m8"
1616#define RP5C01A_TAG      "m301"
1717#define TCM5089_TAG      "m11"
1818#define HD61830_TAG      "m18"
1919#define MSM8251_TAG      "m20"
2020
21#define TANDY200_VIDEORAM_SIZE   0x2000
22#define TANDY200_VIDEORAM_MASK   0x1fff
23
2421typedef struct _kc85_state kc85_state;
2522struct _kc85_state
2623{
r6219r6220
3128   int upd1990a_data;      /* RTC data output */
3229
3330   /* keyboard state */
34   UINT16 keylatch;
31   UINT16 keylatch;      /* keyboard latch */
3532
36   /* video state */
37   int lcd_cs2[10];      /* LCD driver chip select */
38
3933   /* sound state */
4034   int buzzer;            /* buzzer select */
4135   int bell;            /* bell output */
r6219r6220
5953   UINT8 bank;            /* memory bank selection */
6054
6155   /* keyboard state */
62   UINT16 keylatch;
56   UINT16 keylatch;      /* keyboard latch */
6357   int tp;               /* timing pulse */
6458
65   /* video state */
66   UINT8 *video_ram;      /* video RAM */
67
6859   /* sound state */
6960   int buzzer;            /* buzzer select */
7061   int bell;            /* bell output */
r6219r6220
8071
8172/* ---------- defined in video/kyocera.c ---------- */
8273
83READ8_HANDLER( kc85_lcd_status_r );
84READ8_HANDLER( kc85_lcd_data_r );
85WRITE8_HANDLER( kc85_lcd_command_w );
86WRITE8_HANDLER( kc85_lcd_data_w );
87
8874MACHINE_DRIVER_EXTERN( kc85_video );
8975MACHINE_DRIVER_EXTERN( tandy200_video );
9076
src/mess/messdriv.c
r6219r6220
13341334
13351335    /* Kyocera (and clones) */
13361336    DRIVER( kc85 )
1337    DRIVER( olivm10 )
1338//  DRIVER( olivm10m )
1337    DRIVER( m10 )
1338//  DRIVER( m10m )
13391339    DRIVER( trsm100 )
13401340    DRIVER( tandy102 )
13411341    DRIVER( tandy200 )
src/mess/drivers/kyocera.c
r6219r6220
2828
2929    TODO:
3030
31    -   --- memory leak warning ---
32        allocation #004834, 256 bytes (src/lib/util/astring.c:127)
33        a total of 256 bytes were not free()'d
3431    - un-Y2K-hack tandy200
3532    - keyboard is unresponsive for couple of seconds after boot
3633    - soft power on/off
r6219r6220
7875#include "machine/i8155.h"
7976#include "machine/rp5c01a.h"
8077#include "machine/msm8251.h"
78#include "video/hd44102.h"
8179#include "video/hd61830.h"
8280#include "sound/speaker.h"
8381#include "devices/messram.h"
r6219r6220
473471   cassette_change_state(state->cassette, BIT(data, 1) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
474472}
475473
474static READ8_HANDLER( lcd_r )
475{
476   kc85_state *state = space->machine->driver_data;
477
478   UINT8 data = 0;
479   int i;
480
481   for (i = 0; i < 10; i++)
482   {
483      data |= hd44102_r(state->hd44102[i], offset);
484   }
485
486   return data;
487}
488
489static WRITE8_HANDLER( lcd_w )
490{
491   kc85_state *state = space->machine->driver_data;
492   int i;
493
494   for (i = 0; i < 10; i++)
495   {
496      hd44102_w(state->hd44102[i], offset, data);
497   }
498}
499
476500/* Memory Maps */
477501
478502static ADDRESS_MAP_START( kc85_mem, ADDRESS_SPACE_PROGRAM, 8 )
r6219r6220
504528//  AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE(IM6402_TAG, im6402_data_r, im6402_data_w)
505529   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_READWRITE(uart_status_r, uart_ctrl_w)
506530   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_READWRITE(keyboard_r, kc85_ctrl_w)
507   AM_RANGE(0xf0, 0xf0) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_status_r, kc85_lcd_command_w)
508   AM_RANGE(0xf1, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_data_r, kc85_lcd_data_w)
531   AM_RANGE(0xf0, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(lcd_r, lcd_w)
509532ADDRESS_MAP_END
510533
511534static ADDRESS_MAP_START( trsm100_io, ADDRESS_SPACE_IO, 8 )
r6219r6220
518541//  AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE(IM6402_TAG, im6402_data_r, im6402_data_w)
519542   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_READWRITE(uart_status_r, uart_ctrl_w)
520543   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_READWRITE(keyboard_r, kc85_ctrl_w)
521   AM_RANGE(0xf0, 0xf0) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_status_r, kc85_lcd_command_w)
522   AM_RANGE(0xf1, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_data_r, kc85_lcd_data_w)
544   AM_RANGE(0xf0, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(lcd_r, lcd_w)
523545ADDRESS_MAP_END
524546
525547static ADDRESS_MAP_START( pc8201_io, ADDRESS_SPACE_IO, 8 )
r6219r6220
532554//  AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE(IM6402_TAG, im6402_data_r, im6402_data_w)
533555   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_READWRITE(pc8201_uart_status_r, uart_ctrl_w)
534556   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_READ(keyboard_r)
535   AM_RANGE(0xf0, 0xf0) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_status_r, kc85_lcd_command_w)
536   AM_RANGE(0xf1, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(kc85_lcd_data_r, kc85_lcd_data_w)
557   AM_RANGE(0xf0, 0xf1) AM_MIRROR(0x0e) AM_READWRITE(lcd_r, lcd_w)
537558ADDRESS_MAP_END
538559
539560static ADDRESS_MAP_START( tandy200_io, ADDRESS_SPACE_IO, 8 )
r6219r6220
545566   AM_RANGE(0xc1, 0xc1) AM_MIRROR(0x0e) AM_DEVREADWRITE(MSM8251_TAG, msm8251_status_r, msm8251_control_w)
546567   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_READWRITE(tandy200_bank_r, tandy200_bank_w)
547568   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_READWRITE(tandy200_stbk_r, tandy200_stbk_w)
548   AM_RANGE(0xf0, 0xf0) AM_MIRROR(0x0e) AM_DEVREADWRITE(HD61830_TAG, hd61830_data_r, hd61830_data_w)
549   AM_RANGE(0xf1, 0xf1) AM_MIRROR(0x0e) AM_DEVREADWRITE(HD61830_TAG, hd61830_status_r, hd61830_control_w)
569   AM_RANGE(0xf0, 0xf1) AM_MIRROR(0x0e) AM_DEVREADWRITE(HD61830_TAG, hd61830_r, hd61830_w)
550570ADDRESS_MAP_END
551571
552572/* Input Ports */
r6219r6220
862882   state->keylatch = (state->keylatch & 0x100) | data;
863883
864884   /* LCD */
865   state->lcd_cs2[0] = BIT(data, 0);
866   state->lcd_cs2[1] = BIT(data, 1);
867   state->lcd_cs2[2] = BIT(data, 2);
868   state->lcd_cs2[3] = BIT(data, 3);
869   state->lcd_cs2[4] = BIT(data, 4);
870   state->lcd_cs2[5] = BIT(data, 5);
871   state->lcd_cs2[6] = BIT(data, 6);
872   state->lcd_cs2[7] = BIT(data, 7);
885   hd44102_cs2_w(state->hd44102[0], BIT(data, 0));
886   hd44102_cs2_w(state->hd44102[1], BIT(data, 1));
887   hd44102_cs2_w(state->hd44102[2], BIT(data, 2));
888   hd44102_cs2_w(state->hd44102[3], BIT(data, 3));
889   hd44102_cs2_w(state->hd44102[4], BIT(data, 4));
890   hd44102_cs2_w(state->hd44102[5], BIT(data, 5));
891   hd44102_cs2_w(state->hd44102[6], BIT(data, 6));
892   hd44102_cs2_w(state->hd44102[7], BIT(data, 7));
873893
874894   /* RTC */
875895   upd1990a_c0_w(state->upd1990a, BIT(data, 0));
r6219r6220
902922   state->keylatch = (BIT(data, 0) << 8) | (state->keylatch & 0xff);
903923
904924   /* LCD */
905   state->lcd_cs2[8] = BIT(data, 0);
906   state->lcd_cs2[9] = BIT(data, 1);
925   hd44102_cs2_w(state->hd44102[8], BIT(data, 0));
926   hd44102_cs2_w(state->hd44102[9], BIT(data, 1));
907927
908928   /* beeper */
909929   state->buzzer = BIT(data, 2);
r6219r6220
9821002   state->keylatch = (BIT(data, 0) << 8) | (state->keylatch & 0xff);
9831003
9841004   /* LCD */
985   state->lcd_cs2[8] = BIT(data, 0);
986   state->lcd_cs2[9] = BIT(data, 1);
1005   hd44102_cs2_w(state->hd44102[8], BIT(data, 0));
1006   hd44102_cs2_w(state->hd44102[9], BIT(data, 1));
9871007
9881008   /* beeper */
9891009   state->buzzer = BIT(data, 2);
r6219r6220
14971517   ROM_CART_LOAD("cart", 0x0000, 0x8000, ROM_NOMIRROR | ROM_OPTIONAL)
14981518ROM_END
14991519
1500ROM_START( olivm10 )
1520ROM_START( m10 )
15011521   // 3256C02-4B3/I        Italian
15021522   ROM_REGION( 0x8010, I8085_TAG, 0 )
15031523   ROM_LOAD( "m10rom.m12", 0x0000, 0x8000, CRC(f0e8447a) SHA1(d58867276213116a79f7074109b7d7ce02e8a3af) )
r6219r6220
15281548
15291549/* System Drivers */
15301550/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG      COMPANY                 FULLNAME */
1531COMP( 1983,   kc85,      0,      0,      kc85,      kc85,      0,      0,      "Kyosei",            "Kyotronic 85 (Japan)", 0 )
1532COMP( 1983, olivm10,   kc85,   0,      kc85,      olivm10,   0,      0,      "Olivetti",            "M-10", 0 )
1533//COMP( 1983, olivm10m, kc85,   0,      kc85,       olivm10,    0,      0,       "Olivetti",             "M-10 Modem (US)", 0 )
1534COMP( 1983, trsm100,   0,      0,      trsm100,   kc85,      0,      0,   "Tandy Radio Shack",   "TRS-80 Model 100", 0 )
1535COMP( 1986, tandy102,   trsm100,0,      tandy102,   kc85,      0,      0,   "Tandy Radio Shack",   "Tandy 102", 0 )
1536//COMP( 1983, npc8201,  0,      0,      pc8201,     pc8201a,    0,      0,     "NEC",                  "PC-8201 (Japan)", 0 )
1537COMP( 1983, npc8201a,   0,      0,      pc8201,      pc8201a,   0,      0,      "NEC",               "PC-8201A", 0 )
1538//COMP( 1987, npc8300,  npc8201,0,      pc8300,     pc8300,     0,      0,     "NEC",                  "PC-8300", 0 )
1539COMP( 1984, tandy200,   0,      0,      tandy200,   kc85,      0,      0,   "Tandy Radio Shack",   "Tandy 200", 0 )
1551COMP( 1983,   kc85,      0,      0,      kc85,      kc85,      0,      0,         "Kyosei",            "Kyotronic 85 (Japan)", 0 )
1552COMP( 1983, m10,      kc85,   0,      kc85,      olivm10,   0,      0,         "Olivetti",            "M-10", 0 )
1553//COMP( 1983, m10m,     kc85,   0,      kc85,       olivm10,    0,      0,         "Olivetti",             "M-10 Modem (US)", 0 )
1554COMP( 1983, trsm100,   0,      0,      trsm100,   kc85,      0,      0,         "Tandy Radio Shack",   "TRS-80 Model 100", 0 )
1555COMP( 1986, tandy102,   trsm100,0,      tandy102,   kc85,      0,      0,         "Tandy Radio Shack",   "Tandy 102", 0 )
1556//COMP( 1983, npc8201,  0,      0,      pc8201,     pc8201a,    0,      0,         "NEC",                  "PC-8201 (Japan)", 0 )
1557COMP( 1983, npc8201a,   0,      0,      pc8201,      pc8201a,   0,      0,         "NEC",               "PC-8201A", 0 )
1558//COMP( 1987, npc8300,  npc8201,0,      pc8300,     pc8300,     0,      0,         "NEC",                  "PC-8300", 0 )
1559COMP( 1984, tandy200,   0,      0,      tandy200,   kc85,      0,      0,         "Tandy Radio Shack",   "Tandy 200", 0 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team