Previous 15994 Revisions Next

r8882 Tuesday 24th August, 2010 at 11:58:02 UTC by Miodrag Milanović
[JR100] Support for custom char set
[src/mess/drivers]jr100.c

src/mess/drivers/jr100.c
r8881r8882
1414#include "sound/beep.h"
1515
1616static UINT8 *jr100_vram;
17static UINT8 *jr100_pcg;
1718static UINT8 keyboard_line;
19static bool jr100_use_pcg;
1820
1921static ADDRESS_MAP_START(jr100_mem, ADDRESS_SPACE_PROGRAM, 8)
2022   ADDRESS_MAP_UNMAP_HIGH
2123   AM_RANGE(0x0000, 0x3fff) AM_RAM
22   AM_RANGE(0xc000, 0xc0ff) AM_RAM
24   AM_RANGE(0xc000, 0xc0ff) AM_RAM AM_BASE(&jr100_pcg)
2325   AM_RANGE(0xc100, 0xc3ff) AM_RAM AM_BASE(&jr100_vram)
2426   AM_RANGE(0xc800, 0xc80f) AM_DEVREADWRITE("via", via_r, via_w)
2527   AM_RANGE(0xe000, 0xffff) AM_ROM   
r8881r8882
105107{
106108   int x,y,xi,yi;
107109
110   UINT8 *gfx_data = memory_region(screen->machine, "maincpu") + 0xe000;
111   if (jr100_use_pcg) {
112      gfx_data = jr100_pcg;
113   }
108114   for (y = 0; y < 24; y++)
109115   {
110116      for (x = 0; x < 32; x++)
r8881r8882
116122         {
117123            for(xi=0;xi<8;xi++)
118124            {
119               UINT8 *gfx_data = memory_region(screen->machine, "maincpu") + 0xe000;
120
121125               UINT8 pen = (gfx_data[(tile*8)+yi]>>(7-xi) & 1);
122
123126               *BITMAP_ADDR16(bitmap, y*8+yi, x*8+xi) = attr ^ pen;
124127            }
125128         }
r8881r8882
166169
167170static WRITE8_DEVICE_HANDLER(jr100_via_write_b )
168171{
169   
172   jr100_use_pcg = (data & 0x20) ? TRUE : FALSE;
170173}
174
171175static const via6522_interface jr100_via_intf =
172176{
173177   DEVCB_NULL,                                 /* in_a_func */
r8881r8882
194198
195199static TIMER_DEVICE_CALLBACK( cassette_tick )
196200{
197/*   running_device *via = timer.machine->device("via");
198   int data = (cassette_input(timer.machine->device("cassette")) > +0.0) ? 1 : 0;
199   via_ca1_w(via, data);
200   via_cb1_w(via, data);*/
201
201202}
202203
203204static MACHINE_DRIVER_START( jr100 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team