Previous 15994 Revisions Next

r13753 Tuesday 27th December, 2011 at 16:38:56 UTC by Sandro Ronco
Added skeleton for Axel AX-20.
[src/mess]mess.lst mess.mak
[src/mess/drivers]ax20.c*

src/mess/mess.lst
r13752r13753
20702070csc
20712071chesstrv
20722072alphatro
2073ax20
src/mess/mess.mak
r13752r13753
17371737   $(MESS_DRIVERS)/alphatro.o   \
17381738   $(MESS_DRIVERS)/amico2k.o   \
17391739   $(MESS_DRIVERS)/applix.o   \
1740   $(MESS_DRIVERS)/ax20.o      \
17401741   $(MESS_DRIVERS)/babbage.o   \
17411742   $(MESS_DRIVERS)/beehive.o   \
17421743   $(MESS_DRIVERS)/bob85.o      \
src/mess/drivers/ax20.c
r0r13753
1/***************************************************************************
2
3    Axel AX-20
4
5    27/12/2011 Skeleton driver.
6
7    Hardware description:
8    - CPU: I8088
9    - FDC: I8272
10    - PIT: I8253
11    - PIC: I8259
12
13    Also marketed under the Matra brand as MAX-20 ("M" for Matra ?)
14
15****************************************************************************/
16#define ADDRESS_MAP_MODERN
17
18#include "emu.h"
19#include "cpu/i86/i86.h"
20#include "imagedev/flopdrv.h"
21#include "formats/basicdsk.h"
22
23class ax20_state : public driver_device
24{
25public:
26   ax20_state(const machine_config &mconfig, device_type type, const char *tag)
27      : driver_device(mconfig, type, tag),
28      m_maincpu(*this, "maincpu")
29   { }
30
31   required_device<cpu_device> m_maincpu;
32
33   virtual void machine_start();
34   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
35
36   UINT8 *m_p_vram;
37};
38
39
40bool ax20_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
41{
42   for ( int y = 0; y < 24; y++ )
43   {
44      for ( int x = 0; x < 80; x++ )
45      {
46         UINT16 tile = m_p_vram[24 +  y * 128 + x ] & 0x7f;
47
48         drawgfx_opaque(&bitmap, &cliprect, machine().gfx[0], tile, 0, 0, 0, x*8, y*12);
49      }
50   }
51
52   return 0;
53}
54
55
56static ADDRESS_MAP_START(ax20_map, AS_PROGRAM, 8, ax20_state)
57   ADDRESS_MAP_UNMAP_HIGH
58   AM_RANGE(0x00000,0x1ffff) AM_RAM
59   AM_RANGE(0x20000,0x3ffff) AM_RAM //optional RAM
60   AM_RANGE(0xf0400,0xf0fff) AM_RAM AM_BASE(m_p_vram)
61   AM_RANGE(0xff800,0xfffff) AM_ROM AM_REGION("ipl", 0)
62ADDRESS_MAP_END
63
64static ADDRESS_MAP_START(ax20_io, AS_IO, 8, ax20_state)
65   ADDRESS_MAP_UNMAP_HIGH
66ADDRESS_MAP_END
67
68/* Input ports */
69static INPUT_PORTS_START( ax20 )
70INPUT_PORTS_END
71
72
73void ax20_state::machine_start()
74{
75}
76
77static const gfx_layout ax20_charlayout =
78{
79   8, 12,
80   128,
81   1,
82   { 0 },
83   { 4*8+7, 4*8+6, 4*8+5, 4*8+4, 4*8+3, 4*8+2, 4*8+1, 4*8+0 },
84   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 8*9, 8*10, 8*11 },
85   8*16
86};
87
88static GFXDECODE_START( ax20 )
89   GFXDECODE_ENTRY( "chargen", 0x0000, ax20_charlayout, 0, 1 )
90GFXDECODE_END
91
92static const floppy_interface ax20_floppy_interface =
93{
94   DEVCB_NULL,
95   DEVCB_NULL,
96   DEVCB_NULL,
97   DEVCB_NULL,
98   DEVCB_NULL,
99   FLOPPY_STANDARD_5_25_DSDD_40, // TODO
100   LEGACY_FLOPPY_OPTIONS_NAME(default),
101   NULL,
102   NULL
103};
104
105static MACHINE_CONFIG_START( ax20, ax20_state )
106   /* basic machine hardware */
107   MCFG_CPU_ADD("maincpu", I8088, XTAL_14_31818MHz/3)
108   MCFG_CPU_PROGRAM_MAP(ax20_map)
109   MCFG_CPU_IO_MAP(ax20_io)
110
111   /* video hardware */
112   MCFG_SCREEN_ADD("screen", RASTER)
113   MCFG_SCREEN_REFRESH_RATE(50)
114   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
115   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
116   MCFG_SCREEN_SIZE(80*8, 24*12)
117   MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*12-1)
118   MCFG_GFXDECODE(ax20)
119   MCFG_PALETTE_LENGTH(2)
120   MCFG_PALETTE_INIT(monochrome_green)
121
122   /* Devices */
123   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, ax20_floppy_interface)
124MACHINE_CONFIG_END
125
126/* ROM definition */
127ROM_START( ax20 )
128   ROM_REGION( 0x0800, "ipl", 0 )
129   ROM_LOAD( "ax20-s.rom", 0x0000, 0x0800, CRC(f11f95b9) SHA1(59949332dd431fcf8211c2d556e1f49351e90750))
130
131   ROM_REGION( 0x4000, "chargen", 0 )
132   ROM_LOAD( "ax20-g.rom", 0x0000, 0x0800, CRC(90bcef80) SHA1(922067fd7316de9e69b9600c793ada5c87197eeb))
133ROM_END
134
135/* Driver */
136
137/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY           FULLNAME       FLAGS */
138COMP( 1982, ax20,  0,      0,       ax20,     ax20,    0,     "Axel",   "AX-20", GAME_NOT_WORKING | GAME_NO_SOUND)
139

Previous 15994 Revisions Next


© 1998-2018 The MESS Team