Previous 199869 Revisions Next

r34632 Sunday 18th January, 2015 at 14:09:46 UTC by Felipe CorrĂȘa da Silva Sanches
(mess) banctec: gfx layout for the R6545 character generator emulation
[src/mess/drivers]banctec.c
[src/mess/includes]banctec.h

trunk/src/mess/drivers/banctec.c
r243143r243144
11#include "emu.h"
22#include "cpu/m6805/m6805.h"
33#include "includes/banctec.h"
4#include "video/mc6845.h"
45
56static ADDRESS_MAP_START( banctec_mem , AS_PROGRAM, 8, banctec_state )
67   AM_RANGE(0x0000, 0x1fff) AM_ROM
8   AM_RANGE(0x2000, 0x7fff) AM_RAM /* Probably wrong. Must be verified on pcb! */
9   AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("videoram") /* Probably wrong. Must be verified on pcb! */
710ADDRESS_MAP_END
811
9#if 0
10static const gfx_layout banctec_charlayout =
12void banctec_state::machine_reset()
1113{
12      8,8,
13      256*8,                                    /* 256 characters */
14      1,                      /* 1 bits per pixel */
15      { 0 },                  /* no bitplanes; 1 bit per pixel */
16      /* x offsets */
17      {
18         0,
19         1,
20         2,
21         3,
22         4,
23         5,
24         6,
25         7,
26      },
27      /* y offsets */
28      {
29         0,
30         8,
31         16,
32         24,
33         32,
34         40,
35         48,
36         56,
37      },
38      8*8
14}
15
16
17/****************************
18* Video/Character functions *
19****************************/
20
21TILE_GET_INFO_MEMBER(banctec_state::get_bg_tile_info)
22{
23   UINT8 *videoram = m_videoram;
24   int code = videoram[tile_index];
25   int color = 1;
26
27   SET_TILE_INFO_MEMBER(0, code, color, 0);
28}
29
30void banctec_state::video_start()
31{
32   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(banctec_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 40, 25);
33}
34
35UINT32 banctec_state::screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
36{
37   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
38
39   return 0;
40}
41
42/******************************
43* Graphics Decode Information *
44******************************/
45
46const gfx_layout banctec_gfx_layout =
47{
48   8, 8,               /* 8x8 characters */
49   256,                /* 256 characters */
50   1,                  /* 1 bits per pixel */
51   {0},                /* no bitplanes; 1 bit per pixel */
52   {0, 1, 2, 3, 4, 5, 6, 7},
53   {0 * 256*8, 1 * 256*8, 2 * 256*8, 3 * 256*8, 4 * 256*8, 5 * 256*8, 6 * 256*8, 7 * 256*8},
54   8                 /* size of one char */
3955};
4056
4157static GFXDECODE_START( banctec )
42   GFXDECODE_ENTRY( "gfx1", 0x0000, banctec_charlayout, 0, 2 )
58         GFXDECODE_ENTRY( "gfx", 0x00000, banctec_gfx_layout, 0, 2 )
4359GFXDECODE_END
44#endif
4560
46void banctec_state::machine_reset()
47{
48}
49
5061static MACHINE_CONFIG_START( banctec, banctec_state )
5162   /* basic machine hardware */
5263   MCFG_CPU_ADD("maincpu", M6805, 4000000)     /* 4000000? */
r243143r243144
5566// The video signal is generated by a R6545EAP character generator chip
5667// The U20 EPROM holds the image data for the character set.
5768
58#if 0
59   /* video hardware */
60   MCFG_SCREEN_ADD("screen", LCD)
61   MCFG_SCREEN_REFRESH_RATE(LCD_FRAMES_PER_SECOND)
62   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
63   MCFG_SCREEN_SIZE(64*4, 128) /* 160 x 102 */
64   MCFG_SCREEN_VISIBLE_AREA(0, 64*4-1, 0, 128-1)
69   // video hardware
70   MCFG_SCREEN_ADD("screen", RASTER)
71   MCFG_SCREEN_REFRESH_RATE(60)
72   MCFG_SCREEN_SIZE((52+1)*8, (31+1)*8)
73   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 25*8-1)
6574   MCFG_SCREEN_UPDATE_DRIVER(banctec_state, screen_update_banctec)
6675   MCFG_SCREEN_PALETTE("palette")
6776
68   MCFG_GFXDECODE_ADD("gfxdecode", "palette", banctec )
69   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
70#endif
77   MCFG_GFXDECODE_ADD("gfxdecode", "palette", banctec)
78   MCFG_PALETTE_ADD("palette", 2)
79//   MCFG_PALETTE_INIT_OWNER(banctec_state, banctec)
7180
81   MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_20MHz) /* (?) */
82   MCFG_MC6845_SHOW_BORDER_AREA(false)
83   MCFG_MC6845_CHAR_WIDTH(8)
84
7285MACHINE_CONFIG_END
7386
7487ROM_START(banctec)
r243143r243144
8699***************************************************************************/
87100
88101/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT    MONITOR COMPANY   FULLNAME */
89CONS( 1993, banctec, 0,        0,      banctec, 0, driver_device, 0,       "BancTec", "ESeries Panel", GAME_NOT_WORKING | GAME_NO_SOUND)
102CONS( 1989, banctec, 0,        0,      banctec, 0, driver_device, 0,       "DALE Electronics",  "BancTec ESeries Panel", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/includes/banctec.h
r243143r243144
1313public:
1414   banctec_state(const machine_config &mconfig, device_type type, const char *tag)
1515      : driver_device(mconfig, type, tag),
16      m_maincpu(*this, "maincpu") { }
16      m_maincpu(*this, "maincpu"),
17      m_gfxdecode(*this, "gfxdecode"),
18      m_videoram(*this, "videoram") { }
1719
1820   DECLARE_READ8_MEMBER(banctec_read);
1921   DECLARE_WRITE8_MEMBER(banctec_write);
22   TILE_GET_INFO_MEMBER(get_bg_tile_info);
2023   virtual void machine_reset();
21//   virtual void video_start();
22//   UINT32 screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
24   virtual void video_start();
25   UINT32 screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
26
2327   required_device<cpu_device> m_maincpu;
28   required_device<gfxdecode_device> m_gfxdecode;
29   required_shared_ptr<UINT8> m_videoram;
30
31   tilemap_t *m_bg_tilemap;
2432};
2533
2634#endif /* BANCTEC_H_ */


Previous 199869 Revisions Next


© 1997-2024 The MAME Team