Previous 199869 Revisions Next

r34848 Wednesday 4th February, 2015 at 13:37:41 UTC by Couriersud
Merge branch 'master' of https://github.com/mamedev/mame.git

Conflicts:
  src/osd/sdl/drawsdl.c
[3rdparty/bgfx/src]renderer_d3d11.cpp
[src/lib]lib.mak
[src/mame]mame.lst
[src/mame/drivers]aleck64.c naomi.c silvmil.c
[src/mame/video]decospr.c decospr.h
[src/mess/drivers]mbee.c
[src/mess/includes]mbee.h
[src/mess/machine]mbee.c
[src/osd/sdl]drawsdl.c
[src/osd/windows]vconv.c winprefix.h

trunk/3rdparty/bgfx/src/renderer_d3d11.cpp
r243359r243360
345345   static const GUID IID_IDXGIDevice2          = { 0x05008617, 0xfbfd, 0x4051, { 0xa7, 0x90, 0x14, 0x48, 0x84, 0xb4, 0xf6, 0xa9 } };
346346   static const GUID IID_IDXGIDevice3          = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } };
347347   static const GUID IID_IDXGIAdapter          = { 0x2411e7e1, 0x12ac, 0x4ccf, { 0xbd, 0x14, 0x97, 0x98, 0xe8, 0x53, 0x4d, 0xc0 } };
348   static const GUID IID_ID3D11InfoQueue      = { 0x6543dbb6, 0x1b48, 0x42f5, { 0xab, 0x82, 0xe9, 0x7e, 0xc7, 0x43, 0x26, 0xf6 } };
348349
349350   static const GUID s_deviceIIDs[] =
350351   {
r243359r243360
669670         if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
670671         {
671672            ID3D11InfoQueue* infoQueue;
672            hr = m_device->QueryInterface(__uuidof(ID3D11InfoQueue), (void**)&infoQueue);
673            hr = m_device->QueryInterface(IID_ID3D11InfoQueue, (void**)&infoQueue);
673674
674675            if (SUCCEEDED(hr) )
675676            {
trunk/src/lib/lib.mak
r243359r243360
646646
647647BGFXINC = -I$(3RDPARTY)/bgfx/include -I$(3RDPARTY)/bgfx/3rdparty -I$(3RDPARTY)/bx/include -I$(3RDPARTY)/bgfx/3rdparty/khronos
648648ifdef MSVC_BUILD
649   BGFXINC += -I$(3RDPARTY)/bx/include/compat/msvc
649   BGFXINC += -I$(3RDPARTY)/bx/include/compat/msvc /EHsc
650650else
651651   ifeq ($(TARGETOS),win32)
652652      BGFXINC += -I$(3RDPARTY)/bx/include/compat/mingw
trunk/src/mame/drivers/aleck64.c
r243359r243360
975975   PIF_BOOTROM
976976
977977   ROM_REGION32_BE( 0x4000000, "user2", 0 )
978   ROM_LOAD16_WORD_SWAP( "nus-zcaj.u4", 0x000000, 0x1000000, CRC(ec4563fc) SHA1(4d5a30873a5850cf4cd1c0bdbe24e1934f163cd0) )
979
978   ROM_LOAD16_WORD_SWAP( "nus-zcaj.u4", 0x000000, 0x1000000, CRC(c9de64db) SHA1(59932c70b43ff8e9264c670f37b3abbe939b7f95) )
980979   ROM_REGION32_BE( 0x100000, "user3", 0 )
981980   ROM_LOAD ( "tet-01m.u5", 0x000000, 0x100000, CRC(f78f859b) SHA1(b07c85e0453869fe43792f42081f64a5327e58e6) )
982981
trunk/src/mame/drivers/naomi.c
r243359r243360
88128812   ROM_REGION( 0x8000000, "rom_board", ROMREGION_ERASE)
88138813   ROM_LOAD( "695-0014.u3",  0x0000000, 0x1000000, CRC(9fdd7d07) SHA1(56d580dda116823ea5dc5e1bd5154463a476866a) )
88148814   ROM_LOAD( "695-0014.u1",  0x1000000, 0x1000000, CRC(a91d2fcb) SHA1(8414386c09ba36ea581c8161f6cf2a13cc5ae516) )
8815   ROM_LOAD( "695-0014.u2",  0x2000000, 0x1000000, CRC(4d82152f) SHA1(a448983d4e81eb6485b62f23a6c99d1112a20c21) )
8816   ROM_LOAD( "695-0014.u4",  0x3000000, 0x1000000, CRC(3342f237) SHA1(e617b0e1f8d8da9783c58ab98eb91de2363ec36f) )
8817   ROM_LOAD( "695-0014.u14", 0x4000000, 0x1000000, CRC(55470242) SHA1(789036189ae5488a9da565774bdf91b49cd8264e) )
8818   ROM_LOAD( "695-0014.u15", 0x5000000, 0x1000000, CRC(d239a549) SHA1(71f3c1c2ae2a9b6f09f30e7be3bb11ba111276ae) )
8819   ROM_LOAD( "695-0014.u16", 0x6000000, 0x1000000, CRC(730180a4) SHA1(017b82e2d2744695e3e521d35a8511ecc1c8ab43) )
8820   ROM_LOAD( "695-0014.u17", 0x7000000, 0x1000000, CRC(16bb5992) SHA1(18772587272aba1d50a48d384f472276c3b48d96) )
8815   ROM_LOAD( "695-0014.u4",  0x2000000, 0x1000000, CRC(3342f237) SHA1(e617b0e1f8d8da9783c58ab98eb91de2363ec36f) )
8816   ROM_LOAD( "695-0014.u2",  0x3000000, 0x1000000, CRC(4d82152f) SHA1(a448983d4e81eb6485b62f23a6c99d1112a20c21) )
8817   ROM_LOAD( "695-0014.u15", 0x4000000, 0x1000000, CRC(d239a549) SHA1(71f3c1c2ae2a9b6f09f30e7be3bb11ba111276ae) )
8818   ROM_LOAD( "695-0014.u17", 0x5000000, 0x1000000, CRC(16bb5992) SHA1(18772587272aba1d50a48d384f472276c3b48d96) )
8819   ROM_LOAD( "695-0014.u14", 0x6000000, 0x1000000, CRC(55470242) SHA1(789036189ae5488a9da565774bdf91b49cd8264e) )
8820   ROM_LOAD( "695-0014.u16", 0x7000000, 0x1000000, CRC(730180a4) SHA1(017b82e2d2744695e3e521d35a8511ecc1c8ab43) )
88218821
88228822   ROM_REGION( 4, "rom_key", 0 )
88238823   ROM_LOAD( "695-0014.bin", 0, 4, CRC(553dd361) SHA1(a60a26b5ee786cf0bb3d09bb6f00374598fbd7cc) )
trunk/src/mame/drivers/silvmil.c
r243359r243360
261261   PORT_SERVICE_DIPLOC(  0x8000, IP_ACTIVE_LOW, "SW2:8" ) /* Verified */
262262INPUT_PORTS_END
263263
264
265static INPUT_PORTS_START( puzzlove )
266   PORT_START("P1_P2")
267   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_PLAYER(1)
268   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_PLAYER(1)
269   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_PLAYER(1)
270   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
271   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
272   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
273   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
274   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
275   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_PLAYER(2)
276   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_PLAYER(2)
277   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_PLAYER(2)
278   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
279   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
280   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
281   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
282   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
283
284   PORT_START("COIN")
285   PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
286   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
287   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 )
288   PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNKNOWN )
289
290   PORT_START("DSW")
291   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:1")
292   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
293   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
294   PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:2")
295   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
296   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
297   PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:3")
298   PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
299   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
300   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:4")
301   PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
302   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
303   PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:5")
304   PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
305   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
306   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:6")
307   PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
308   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
309   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:7")
310   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
311   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
312   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:8")
313   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
314   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
315   PORT_DIPNAME( 0x0300, 0x0300, "Game Level" )      PORT_DIPLOCATION("SW1:1,2") /* Difficulty?? - Not sure how this works for Easy --> Very Hard */
316   PORT_DIPSETTING(      0x0300, "1" ) /* Initial start time 40 secs */
317   PORT_DIPSETTING(      0x0200, "2" ) /* Initial start time 30 secs - Other in game effects?? */
318   PORT_DIPSETTING(      0x0100, "3" ) /* Initial start time 30 secs - Other in game effects?? */
319   PORT_DIPSETTING(      0x0000, "4" ) /* Initial start time 30 secs - Other in game effects?? */
320   PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:3,4,5")
321   PORT_DIPSETTING(      0x1000, DEF_STR( 4C_1C ) )
322   PORT_DIPSETTING(      0x1400, DEF_STR( 3C_1C ) )
323   PORT_DIPSETTING(      0x0000, DEF_STR( 4C_2C ) ) /* Works the same as 2C/1C */
324   PORT_DIPSETTING(      0x1800, DEF_STR( 2C_1C ) )
325   PORT_DIPSETTING(      0x0400, DEF_STR( 3C_2C ) ) /* Works like 2C/1C then 1C/1C repeat */
326   PORT_DIPSETTING(      0x0800, DEF_STR( 2C_2C ) ) /* Works the same as 1C/1C */
327   PORT_DIPSETTING(      0x1c00, DEF_STR( 1C_1C ) )
328   PORT_DIPSETTING(      0x0c00, DEF_STR( 1C_2C ) )
329   PORT_DIPNAME( 0x2000, 0x2000, "Coin Box" )      PORT_DIPLOCATION("SW1:6") /* Always displays total credits - No separate Credit display per player */
330   PORT_DIPSETTING(      0x2000, "1" ) /* Both players use coins from either Coin 1 or Coin 2 */
331   PORT_DIPSETTING(      0x0000, "2" ) /* Players use coins from own coin chute. IE: Player 1 -> Coin 1, Player 2 -> Coin 2 but shows only total credits */
332   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Lives ) )      PORT_DIPLOCATION("SW1:7")
333   PORT_DIPSETTING(      0x0000, "2" )
334   PORT_DIPSETTING(      0x4000, "3" )
335   PORT_SERVICE_DIPLOC(  0x8000, IP_ACTIVE_LOW, "SW1:8" ) /* Verified */
336INPUT_PORTS_END
337
338
339
264340static const gfx_layout tlayout =
265341{
266342   16,16,
r243359r243360
352428   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2)
353429MACHINE_CONFIG_END
354430
431static MACHINE_CONFIG_DERIVED( puzzlove, silvmil )
432   MCFG_DEVICE_MODIFY("spritegen")
433   MCFG_DECO_SPRITE_BOOTLEG_TYPE(1)
434MACHINE_CONFIG_END
355435
356436ROM_START( silvmil )
357437   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68k */
r243359r243360
405485   ROM_LOAD16_BYTE( "d-20_u56.bin", 0x100001, 0x80000, CRC(e67c2c7d) SHA1(cddfd6a3d934e71853af62e3d2bf312618c9b4ff) )
406486ROM_END
407487
488ROM_START( puzzlove )
489   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68k */
490   ROM_LOAD16_BYTE( "3.u3", 0x00000, 0x40000, CRC(826c8472) SHA1(54f1a9fa0431de840d6fce466e09098a8d601660) )
491   ROM_LOAD16_BYTE( "4.u2", 0x00001, 0x40000, CRC(64ddc708) SHA1(60b29f8cd5dd654be34452fd197a77abc872e63d) )
408492
493   ROM_REGION( 0x20000, "audiocpu", 0 ) /* z80  */
494   ROM_LOAD( "1.uz02", 0x00000, 0x20000, CRC(3077e7f3) SHA1(e2bf634a2166e1851486a801e74a7ec0d4599c28) )
495
496   ROM_REGION( 0x40000, "oki", 0 ) /* samples */
497   ROM_LOAD( "2.uz11", 0x00000, 0x40000, CRC(4c06ec68) SHA1(3cfca1c98e73c65a45b65d43e012c5529572c057) )
498
499   ROM_REGION( 0x100000, "gfx1", 0 )
500   ROM_LOAD16_BYTE( "10.u41",   0x000000, 0x20000, CRC(7200f878) SHA1(27c6389f802f6e0af0210e2b01788914c0eb1d04) )
501   ROM_CONTINUE ( 0x080000,0x20000 )
502   ROM_CONTINUE ( 0x040000,0x20000 )
503   ROM_CONTINUE ( 0x0c0000,0x20000 )
504   ROM_LOAD16_BYTE( "9.u42",   0x000001, 0x20000, CRC(21b1b297) SHA1(0f589d1c62d0f79b1379e4444b119bdc4cc70cfb) )
505   ROM_CONTINUE ( 0x080001,0x20000 )
506   ROM_CONTINUE ( 0x040001,0x20000 )
507   ROM_CONTINUE ( 0x0c0001,0x20000 )
508
509   ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
510   ROM_LOAD16_BYTE( "5.u53", 0x000000, 0x80000, CRC(8707d5a0) SHA1(05480ac34982a4e4768b7f3fccd2e557ca4b2545) )
511   ROM_LOAD16_BYTE( "6.u54", 0x000001, 0x80000, CRC(60a6d614) SHA1(0693c08c51d6b3a05373c9999f01b0b8d23a1c89) )
512   ROM_LOAD16_BYTE( "7.u55", 0x100000, 0x80000, CRC(0f2ea5c4) SHA1(4cb46fc6272e3cc14dfdcd7831157433ee7cf247) )
513   ROM_LOAD16_BYTE( "8.u56", 0x100001, 0x80000, CRC(037dcd3d) SHA1(fcdf604710518982e0b4acc81a56fa703d0c9407) )
514ROM_END
515
409516void silvmil_state::tumblepb_gfx1_rearrange()
410517{
411518   UINT8 *rom = memregion("gfx1")->base();
r243359r243360
432539   tumblepb_gfx1_rearrange();
433540}
434541
435GAME( 1995, silvmil, 0, silvmil, silvmil, silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", GAME_SUPPORTS_SAVE )
542GAME( 1995, silvmil,  0, silvmil, silvmil, silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", GAME_SUPPORTS_SAVE )
543GAME( 1994, puzzlove, 0, puzzlove,puzzlove,silvmil_state, silvmil, ROT0,   "Para", "PuzzLove", GAME_SUPPORTS_SAVE )
trunk/src/mame/mame.lst
r243359r243360
1047910479heuksun         // (c) 1998 Oksan / F2 System
1048010480bestri          // (c) F2 System
1048110481silvmil         // (c) 1995 Para
10482puzzlove      // (c) 1994 Para
1048210483funybubl        // (c) 1999 In Chang Electronic Co
1048310484funybublc       // (c) 1999 Comad Industries
1048410485dcheese         // (c) 1993 HAR
trunk/src/mame/video/decospr.c
r243359r243360
150150      device_video_interface(mconfig, *this),
151151      m_gfxregion(0),
152152      m_is_bootleg(false),
153      m_bootleg_type(0),
153154      m_x_offset(0),
154155      m_y_offset(0),
155156      m_flipallx(0),
r243359r243360
232233      {
233234         sprite = spriteram[offs + 1];
234235         y = spriteram[offs];
235         flash = y & 0x1000;
236         
237         if (m_is_bootleg && (m_bootleg_type == 1))
238         {
239            flash = y & 0x0400;
240         }
241         else
242         {
243            flash = y & 0x1000;
244         }
245
236246         w = y & 0x0800;
237247
238248
r243359r243360
258268
259269            fx = y & 0x2000;
260270            fy = y & 0x4000;
261            multi = (1 << ((y & 0x0600) >> 9)) - 1; /* 1x, 2x, 4x, 8x height */
262271
272            int tempwidth = 0;
273
274            if (m_is_bootleg && (m_bootleg_type==1))  // puzzlove
275            {
276               tempwidth = (y & 0x1000) >> 12;
277               tempwidth |= (y & 0x0200) >> 8;
278            }
279            else
280            {
281               tempwidth |= (y & 0x0600) >> 9;
282            }
283
284            multi = (1 << (tempwidth)) - 1; /* 1x, 2x, 4x, 8x height */
285
263286            /* bootleg support (esd16.c) */
264287            if (flipscreen) x = ((x&0x1ff) - m_x_offset)&0x1ff;
265288            else x = ((x&0x1ff) + m_x_offset)&0x1ff;
trunk/src/mame/video/decospr.h
r243359r243360
2121   static void set_pri_callback(device_t &device, decospr_pri_cb_delegate callback) { downcast<decospr_device &>(device).m_pri_cb = callback; }
2222   static void set_col_callback(device_t &device, decospr_col_cb_delegate callback) { downcast<decospr_device &>(device).m_col_cb = callback; }
2323   static void set_is_bootleg(device_t &device, bool is_bootleg) { downcast<decospr_device &>(device).m_is_bootleg = is_bootleg; }
24   static void set_bootleg_type(device_t &device, int bootleg_type) { downcast<decospr_device &>(device).m_bootleg_type = bootleg_type; }
2425   static void set_flipallx(device_t &device, int flipallx) { downcast<decospr_device &>(device).m_flipallx = flipallx; }
2526   static void set_transpen(device_t &device, int transpen) { downcast<decospr_device &>(device).m_transpen = transpen; }
2627   static void set_offsets(device_t &device, int x_offset, int y_offset)
r243359r243360
5556
5657   // used by various bootleg / clone chips.
5758   bool m_is_bootleg; // used by various bootlegs (disables masking of sprite tile number when multi-sprite is used)
59   int m_bootleg_type; // for Puzzlove, has sprite bits moved around (probably to prevent board swaps)
5860   int m_x_offset, m_y_offset; // used by various bootlegs
5961   int m_flipallx; // used by esd16.c - hedpanio, multchmp , and nmg5.c
6062   int m_transpen; // used by fncywld (tumbleb.c)
r243359r243360
8082#define MCFG_DECO_SPRITE_ISBOOTLEG(_boot) \
8183   decospr_device::set_is_bootleg(*device, _boot);
8284
85#define MCFG_DECO_SPRITE_BOOTLEG_TYPE(_bootleg_type) \
86   decospr_device::set_bootleg_type(*device, _bootleg_type);
87
8388#define MCFG_DECO_SPRITE_FLIPALLX(_flip) \
8489   decospr_device::set_flipallx(*device, _flip);
8590
trunk/src/mess/drivers/mbee.c
r243359r243360
2222    The unemulated Matilda is a IBM XT clone fitted with a NEC V40, and has the
2323    ability to emulate the 256TC as mentioned above.
2424
25    Floppy Disk types (as used by ubee512)
26    - ss80 - single sided 80 track
27    - ds40 - double-sided 40 track - 400KB
28    - ds80, ds82, ds84 - double sided 80 track - 800KB
29    - dsk - various - 211KB, 421KB, 841KB
25    Floppy formats:
26    - All disks are the standard CPCEMU 'dsk' format.
27    - Types are 9cm 80 track, and 13cm 40 track (single or double sided)
28    - 13cm has been specified as QD to prevent a nasty crash if an 80-track disk was mounted
29    - The tracks/sector layout is the same regardless of size
30    - Although certain models came with particular drives as standard, users could add
31      the other size if they wished. We support both sizes on any model.
3032
3133    Microbee Standard / Plus memory map
3234
r243359r243360
8284
8385    - Fix Paste (it loses most of the characters)
8486
85    - RTC for 256TC works, but it is supposed to be an option on other
86      models. It is being completely ignored.
87    - all except 256tc: RTC is optional, but it is being totally ignored.
8788
8889    - Most early models have a clock in Telcom, and in the menu. It doesn't
8990      work.
9091
91    - The Monitor program on 256TC crashes the system. This appears
92      to be a MAME core bug involving the z80pio.
92    - various fdc issues:
93        - only some ds40 disks can be used. All 80-track disks fail.
94        - some disks show no or partial directory listing.
95        - some disks cause MESS to freeze.
96        - ENMF pin missing from wd_fdc.
97        - incorrect timing for track register causes 256tc failure to boot a disk.
98        - 56k model takes about 2 minutes to boot a disk if loaded via command line.
99   
100    - 256tc: At the menu, if F2 pressed to activate the Monitor, the emulated machine
101      crashes due to a bug in z80pio emulation.
102   
103    - 256tc: Keyboard ROM U60 needs to be dumped.
104    - 128k: PROM PAL needs to be dumped, so that the bankswitching can be fixed.
93105
94    - The 256TC corrupts itself when a floppy disk is detected.
95
96    - Disk system doesn't work because of fdc problems.
97
98106    - Teleterm: keyboard is problematic, and cursor doesn't show.
99107
100108
r243359r243360
113121      in the emulator for some years. Conversion to the new modern
114122      implementation (2013-07-05) has not resolved the issue.
115123
116      There are 3 types of microbee disks available in the wild.
117
118    - CPCEMU-format "dsk" disks, which has an already-working
119      format "dsk_dsk".
120
121    - ubee512-format disks, such as "ds80,ds82,ds84,ss80", etc.
122      These are described in "mbee_dsk", but it's not known if it
123      works as yet.
124
125    - There a "img" format for the 128k boot disk. The internal
126      layout is not known and no work has been done.
127
128
129124****************************************************************************/
130125
131126
132127#include "includes/mbee.h"
133#include "formats/mbee_dsk.h"
134128#include "formats/mbee_cas.h"
135129
136130
r243359r243360
219213   AM_RANGE(0xf800, 0xffff) AM_RAMBANK("bankfh")
220214ADDRESS_MAP_END
221215
216static ADDRESS_MAP_START(mbee256_mem, AS_PROGRAM, 8, mbee_state)
217   AM_RANGE(0x0000, 0x0fff) AM_READ_BANK("bankr0") AM_WRITE_BANK("bankw0")
218   AM_RANGE(0x1000, 0x1fff) AM_READ_BANK("bankr1") AM_WRITE_BANK("bankw1")
219   AM_RANGE(0x2000, 0x2fff) AM_READ_BANK("bankr2") AM_WRITE_BANK("bankw2")
220   AM_RANGE(0x3000, 0x3fff) AM_READ_BANK("bankr3") AM_WRITE_BANK("bankw3")
221   AM_RANGE(0x4000, 0x4fff) AM_READ_BANK("bankr4") AM_WRITE_BANK("bankw4")
222   AM_RANGE(0x5000, 0x5fff) AM_READ_BANK("bankr5") AM_WRITE_BANK("bankw5")
223   AM_RANGE(0x6000, 0x6fff) AM_READ_BANK("bankr6") AM_WRITE_BANK("bankw6")
224   AM_RANGE(0x7000, 0x7fff) AM_READ_BANK("bankr7") AM_WRITE_BANK("bankw7")
225   AM_RANGE(0x8000, 0x8fff) AM_READ_BANK("bankr8") AM_WRITE_BANK("bankw8")
226   AM_RANGE(0x9000, 0x9fff) AM_READ_BANK("bankr9") AM_WRITE_BANK("bankw9")
227   AM_RANGE(0xa000, 0xafff) AM_READ_BANK("bankr10") AM_WRITE_BANK("bankw10")
228   AM_RANGE(0xb000, 0xbfff) AM_READ_BANK("bankr11") AM_WRITE_BANK("bankw11")
229   AM_RANGE(0xc000, 0xcfff) AM_READ_BANK("bankr12") AM_WRITE_BANK("bankw12")
230   AM_RANGE(0xd000, 0xdfff) AM_READ_BANK("bankr13") AM_WRITE_BANK("bankw13")
231   AM_RANGE(0xe000, 0xefff) AM_READ_BANK("bankr14") AM_WRITE_BANK("bankw14")
232   AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bankr15") AM_WRITE_BANK("bankw15")
233ADDRESS_MAP_END
234
222235static ADDRESS_MAP_START(mbeett_mem, AS_PROGRAM, 8, mbee_state)
223236   AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("boot")
224237   AM_RANGE(0x1000, 0x7fff) AM_RAM
r243359r243360
614627static GFXDECODE_START( mbeeppc )
615628   GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 8 )
616629GFXDECODE_END
617#if 0
618static LEGACY_FLOPPY_OPTIONS_START(mbee)
619   LEGACY_FLOPPY_OPTION(ss80, "ss80", "SS80 disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
620      HEADS([1])
621      TRACKS([80])
622      SECTORS([10])
623      SECTOR_LENGTH([512])
624      FIRST_SECTOR_ID([1]))
625   LEGACY_FLOPPY_OPTION(ds40, "ds40", "DS40 disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
626      HEADS([2])
627      TRACKS([40])
628      SECTORS([10])
629      SECTOR_LENGTH([512])
630      FIRST_SECTOR_ID([1]))
631   LEGACY_FLOPPY_OPTION(ds80, "ds80", "DS80 disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
632      HEADS([2])
633      TRACKS([80])
634      SECTORS([10])
635      SECTOR_LENGTH([512])
636      FIRST_SECTOR_ID([21]))
637   LEGACY_FLOPPY_OPTION(ds84, "ds82,ds84", "DS84 disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
638      HEADS([2])
639      TRACKS([80])
640      SECTORS([10])
641      SECTOR_LENGTH([512])
642      FIRST_SECTOR_ID([1]))
643LEGACY_FLOPPY_OPTIONS_END
644630
645static const floppy_interface mbee_floppy_interface =
646{
647   FLOPPY_STANDARD_5_25_DSHD,
648   LEGACY_FLOPPY_OPTIONS_NAME(mbee),
649   NULL
650};
651#endif
652
653FLOPPY_FORMATS_MEMBER( mbee_state::floppy_formats )
654   FLOPPY_MBEE_FORMAT
655FLOPPY_FORMATS_END
656
657631static SLOT_INTERFACE_START( mbee_floppies )
658   SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
659   SLOT_INTERFACE( "525dd", FLOPPY_525_QD )
632   SLOT_INTERFACE( "drive3a", FLOPPY_35_DD )
633   SLOT_INTERFACE( "drive3b", FLOPPY_35_DD )
634   SLOT_INTERFACE( "drive5a", FLOPPY_525_QD )
635   SLOT_INTERFACE( "drive5b", FLOPPY_525_QD )
660636SLOT_INTERFACE_END
661637
662638
r243359r243360
686662   MCFG_GFXDECODE_ADD("gfxdecode", "palette", mbee)
687663   MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") // usually sold with amber or green monitor
688664
689   MCFG_VIDEO_START_OVERRIDE(mbee_state,mbee)
665   MCFG_VIDEO_START_OVERRIDE(mbee_state, mbee)
690666
691667   /* sound hardware */
692668   MCFG_SPEAKER_STANDARD_MONO("mono")
r243359r243360
813789   MCFG_CPU_IO_MAP(mbee56_io)
814790   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee56 )
815791   MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) // divided by 2 externally, then divided by 2 internally (/ENMF pin not emulated)
816   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "525dd", mbee_state::floppy_formats)
817   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "35dd", mbee_state::floppy_formats)
792   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(mbee_state, fdc_intrq_w))
793   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(mbee_state, fdc_drq_w))
794   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "drive5a", floppy_image_device::default_floppy_formats)
795   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "drive5b", floppy_image_device::default_floppy_formats)
818796MACHINE_CONFIG_END
819797
820798static MACHINE_CONFIG_DERIVED( mbee64, mbee56 )
r243359r243360
830808   MCFG_CPU_IO_MAP(mbee128_io)
831809   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128 )
832810   MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4)
833   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "35dd", mbee_state::floppy_formats)
834   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "525dd", mbee_state::floppy_formats)
811   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(mbee_state, fdc_intrq_w))
812   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(mbee_state, fdc_drq_w))
813   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "drive5a", floppy_image_device::default_floppy_formats)
814   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "drive5b", floppy_image_device::default_floppy_formats)
835815MACHINE_CONFIG_END
836816
837817static MACHINE_CONFIG_DERIVED( mbee256, mbee128 )
838818   MCFG_CPU_MODIFY( "maincpu" )
819   MCFG_CPU_PROGRAM_MAP(mbee256_mem)
839820   MCFG_CPU_IO_MAP(mbee256_io)
840821   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee256 )
841822   MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz )
r243359r243360
846827   MCFG_MC6845_CHAR_WIDTH(8)
847828   MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeppc_update_row)
848829   MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee256_update_addr)
830   MCFG_DEVICE_REMOVE("fdc:0")
831   MCFG_DEVICE_REMOVE("fdc:1")
832   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "drive3a", floppy_image_device::default_floppy_formats)
833   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "drive3b", floppy_image_device::default_floppy_formats)
849834MACHINE_CONFIG_END
850835
851836static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc )
r243359r243360
11601145ROM_END
11611146
11621147ROM_START( mbee256 ) // 256tc
1163   ROM_REGION(0x40000,"maincpu", ROMREGION_ERASEFF)
1148   ROM_REGION(0x40000, "rams", ROMREGION_ERASEFF)
11641149
1165   ROM_REGION(0x7000,"bootrom", ROMREGION_ERASEFF)
1150   ROM_REGION(0x5000, "roms", 0) // rom plus dummy area
11661151   ROM_SYSTEM_BIOS( 0, "1.20", "Version 1.20" )
1167   ROMX_LOAD("256tc_boot_1.20.rom", 0x0000, 0x4000, CRC(fe8d6a84) SHA1(a037a1b90b18a2180e9f5f216b829fcd480449a4), ROM_BIOS(1) )
1152   ROMX_LOAD("256tc_boot_1.20.u38", 0x0000, 0x4000, CRC(fe8d6a84) SHA1(a037a1b90b18a2180e9f5f216b829fcd480449a4), ROM_BIOS(1) )
11681153   ROM_SYSTEM_BIOS( 1, "1.15", "Version 1.15" )
1169   ROMX_LOAD("256tc_boot_1.15.rom", 0x0000, 0x4000, CRC(1902062d) SHA1(e4a1c0b3f4996e313da0bac0edb6d34e3270723e), ROM_BIOS(2) )
1154   ROMX_LOAD("256tc_boot_1.15.u38", 0x0000, 0x4000, CRC(1902062d) SHA1(e4a1c0b3f4996e313da0bac0edb6d34e3270723e), ROM_BIOS(2) )
11701155
1156   ROM_REGION(0x4000, "proms", 0)
1157   ROM_LOAD( "silver.u39", 0x0000, 0x4000, CRC(c34aab64) SHA1(781fe648488dec90185760f8e081e488b73b68bf) )
1158
11711159   ROM_REGION(0x9800, "gfx", 0)
1172   ROM_LOAD("char256.bin",           0x1000, 0x1000, CRC(9372af3c) SHA1(a63591822c0504de2fed52e88d64e1dbd6124b74) )
1160   ROM_LOAD("char256.u53", 0x1000, 0x1000, CRC(9372af3c) SHA1(a63591822c0504de2fed52e88d64e1dbd6124b74) )
11731161   ROM_IGNORE( 0x1000 )    // throw away swedish characters for now
11741162   ROM_COPY( "gfx", 0x1000, 0x0000, 0x1000 )
11751163
r243359r243360
11841172
11851173***************************************************************************/
11861174
1187/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT       COMPANY         FULLNAME */
1188COMP( 1982, mbee,     0,    0,  mbee,     mbee, mbee_state,     mbee,           "Applied Technology",  "Microbee 16 Standard" , 0 )
1189COMP( 1982, mbeeic,   mbee, 0,  mbeeic,   mbee, mbee_state,     mbeeic,         "Applied Technology",  "Microbee 32 IC" , 0 )
1190COMP( 1982, mbeepc,   mbee, 0,  mbeepc,   mbee, mbee_state,     mbeepc,         "Applied Technology",  "Microbee Personal Communicator" , 0 )
1191COMP( 1985, mbeepc85, mbee, 0,  mbeepc85, mbee, mbee_state,     mbeepc85,       "Applied Technology",  "Microbee PC85" , 0 )
1192COMP( 1985, mbeepc85b,mbee, 0,  mbeepc85b,mbee, mbee_state,     mbeepc85,       "Applied Technology",  "Microbee PC85 (New version)" , 0 )
1193COMP( 1985, mbeepc85s,mbee, 0,  mbeepc85, mbee, mbee_state,     mbeepc85,       "Applied Technology",  "Microbee PC85 (Swedish)" , 0 )
1194COMP( 1986, mbeeppc,  mbee, 0,  mbeeppc,  mbee, mbee_state,     mbeeppc,        "Applied Technology",  "Microbee Premium PC85" , 0 )
1195COMP( 1986, mbeett,   mbee, 0,  mbeett,   mbee256, mbee_state,  mbeett,     "Applied Technology",  "Microbee Teleterm" , GAME_NOT_WORKING )
1196COMP( 1986, mbee56,   mbee, 0,  mbee56,   mbee, mbee_state,     mbee56,         "Applied Technology",  "Microbee 56k" , GAME_NOT_WORKING )
1197COMP( 1986, mbee64,   mbee, 0,  mbee64,   mbee, mbee_state,     mbee64,         "Applied Technology",  "Microbee 64k" , GAME_NOT_WORKING )
1198COMP( 1986, mbee128,  mbee, 0,  mbee128,  mbee, mbee_state,     mbee128,        "Applied Technology",  "Microbee 128k" , GAME_NOT_WORKING )
1199COMP( 1987, mbee256,  mbee, 0,  mbee256,  mbee256, mbee_state,  mbee256,        "Applied Technology",  "Microbee 256TC" , GAME_NOT_WORKING )
1175/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     CLASS        INIT         COMPANY                   FULLNAME */
1176COMP( 1982, mbee,     0,        0,      mbee,     mbee,     mbee_state,  mbee,       "Applied Technology",  "Microbee 16 Standard" , 0 )
1177COMP( 1982, mbeeic,   mbee,     0,      mbeeic,   mbee,     mbee_state,  mbeeic,     "Applied Technology",  "Microbee 32 IC" , 0 )
1178COMP( 1982, mbeepc,   mbee,     0,      mbeepc,   mbee,     mbee_state,  mbeepc,     "Applied Technology",  "Microbee Personal Communicator" , 0 )
1179COMP( 1985, mbeepc85, mbee,     0,      mbeepc85, mbee,     mbee_state,  mbeepc85,   "Applied Technology",  "Microbee PC85" , 0 )
1180COMP( 1985, mbeepc85b,mbee,     0,      mbeepc85b,mbee,     mbee_state,  mbeepc85,   "Applied Technology",  "Microbee PC85 (New version)" , 0 )
1181COMP( 1985, mbeepc85s,mbee,     0,      mbeepc85, mbee,     mbee_state,  mbeepc85,   "Applied Technology",  "Microbee PC85 (Swedish)" , 0 )
1182COMP( 1986, mbeeppc,  mbee,     0,      mbeeppc,  mbee,     mbee_state,  mbeeppc,    "Applied Technology",  "Microbee Premium PC85" , 0 )
1183COMP( 1986, mbeett,   mbee,     0,      mbeett,   mbee256,  mbee_state,  mbeett,     "Applied Technology",  "Microbee Teleterm" , GAME_NOT_WORKING )
1184COMP( 1986, mbee56,   mbee,     0,      mbee56,   mbee,     mbee_state,  mbee56,     "Applied Technology",  "Microbee 56k" , GAME_NOT_WORKING )
1185COMP( 1986, mbee64,   mbee,     0,      mbee64,   mbee,     mbee_state,  mbee64,     "Applied Technology",  "Microbee 64k" , GAME_NOT_WORKING )
1186COMP( 1986, mbee128,  mbee,     0,      mbee128,  mbee,     mbee_state,  mbee128,    "Applied Technology",  "Microbee 128k" , GAME_NOT_WORKING )
1187COMP( 1987, mbee256,  mbee,     0,      mbee256,  mbee256,  mbee_state,  mbee256,    "Applied Technology",  "Microbee 256TC" , GAME_NOT_WORKING )
trunk/src/mess/includes/mbee.h
r243359r243360
3434   };
3535
3636   mbee_state(const machine_config &mconfig, device_type type, const char *tag)
37      : driver_device(mconfig, type, tag),
38      m_maincpu(*this, "maincpu"),
39      m_pio(*this, "z80pio"),
40      m_cassette(*this, "cassette"),
41      m_wave(*this, WAVE_TAG),
42      m_speaker(*this, "speaker"),
43      m_centronics(*this, "centronics"),
44      m_cent_data_out(*this, "cent_data_out"),
45      m_crtc(*this, "crtc"),
46      m_fdc(*this, "fdc"),
47      m_floppy0(*this, "fdc:0"),
48      m_floppy1(*this, "fdc:1"),
49      m_rtc(*this, "rtc"),
50      m_boot(*this, "boot"),
51      m_pak(*this, "pak"),
52      m_telcom(*this, "telcom"),
53      m_basic(*this, "basic"),
54      m_bankl(*this, "bankl"),
55      m_bankh(*this, "bankh"),
56      m_bank1(*this, "bank1"),
57      m_bank8l(*this, "bank8l"),
58      m_bank8h(*this, "bank8h"),
59      m_bank9(*this, "bank9"),
60      m_bankfl(*this, "bankfl"),
61      m_bankfh(*this, "bankfh"),
62      m_io_x0(*this, "X0"),
63      m_io_x1(*this, "X1"),
64      m_io_x2(*this, "X2"),
65      m_io_x3(*this, "X3"),
66      m_io_x4(*this, "X4"),
67      m_io_x5(*this, "X5"),
68      m_io_x6(*this, "X6"),
69      m_io_x7(*this, "X7"),
70      m_io_extra(*this, "EXTRA"),
71      m_io_config(*this, "CONFIG"),
72      m_io_x8(*this, "X8"),
73      m_io_x9(*this, "X9"),
74      m_io_x10(*this, "X10"),
75      m_io_x11(*this, "X11"),
76      m_io_x12(*this, "X12"),
77      m_io_x13(*this, "X13"),
78      m_io_x14(*this, "X14"),
79      m_screen(*this, "screen"),
80      m_palette(*this, "palette") { }
37      : driver_device(mconfig, type, tag)
38      , m_palette(*this, "palette")
39      , m_maincpu(*this, "maincpu")
40      , m_pio(*this, "z80pio")
41      , m_cassette(*this, "cassette")
42      , m_wave(*this, WAVE_TAG)
43      , m_speaker(*this, "speaker")
44      , m_centronics(*this, "centronics")
45      , m_cent_data_out(*this, "cent_data_out")
46      , m_crtc(*this, "crtc")
47      , m_fdc(*this, "fdc")
48      , m_floppy0(*this, "fdc:0")
49      , m_floppy1(*this, "fdc:1")
50      , m_rtc(*this, "rtc")
51      , m_boot(*this, "boot")
52      , m_pak(*this, "pak")
53      , m_telcom(*this, "telcom")
54      , m_basic(*this, "basic")
55      , m_bankl(*this, "bankl")
56      , m_bankh(*this, "bankh")
57      , m_bank1(*this, "bank1")
58      , m_bank8l(*this, "bank8l")
59      , m_bank8h(*this, "bank8h")
60      , m_bank9(*this, "bank9")
61      , m_bankfl(*this, "bankfl")
62      , m_bankfh(*this, "bankfh")
63      , m_io_x0(*this, "X0")
64      , m_io_x1(*this, "X1")
65      , m_io_x2(*this, "X2")
66      , m_io_x3(*this, "X3")
67      , m_io_x4(*this, "X4")
68      , m_io_x5(*this, "X5")
69      , m_io_x6(*this, "X6")
70      , m_io_x7(*this, "X7")
71      , m_io_extra(*this, "EXTRA")
72      , m_io_config(*this, "CONFIG")
73      , m_io_x8(*this, "X8")
74      , m_io_x9(*this, "X9")
75      , m_io_x10(*this, "X10")
76      , m_io_x11(*this, "X11")
77      , m_io_x12(*this, "X12")
78      , m_io_x13(*this, "X13")
79      , m_io_x14(*this, "X14")
80      , m_screen(*this, "screen")
81   { }
8182
8283   DECLARE_WRITE8_MEMBER( mbee_04_w );
8384   DECLARE_WRITE8_MEMBER( mbee_06_w );
r243359r243360
148149   TIMER_CALLBACK_MEMBER(mbee_reset);
149150   DECLARE_QUICKLOAD_LOAD_MEMBER( mbee );
150151   DECLARE_QUICKLOAD_LOAD_MEMBER( mbee_z80bin );
152   WRITE_LINE_MEMBER(fdc_intrq_w);
153   WRITE_LINE_MEMBER(fdc_drq_w);
151154   DECLARE_FLOPPY_FORMATS(floppy_formats);
152155   UINT8 *m_p_videoram;
153156   UINT8 *m_p_gfxram;
r243359r243360
165168   MC6845_ON_UPDATE_ADDR_CHANGED(mbee_update_addr);
166169   MC6845_ON_UPDATE_ADDR_CHANGED(mbee256_update_addr);
167170
171   required_device<palette_device> m_palette;
168172private:
169173   size_t m_size;
170174   UINT8 m_clock_pulse;
r243359r243360
178182   UINT8 m_sy6545_status;
179183   UINT8 m_sy6545_reg[32];
180184   UINT8 m_sy6545_ind;
185   UINT8 m_fdc_rq;
186   void mbee256_setup_banks(UINT8 data);
181187   void sy6545_cursor_configure();
182188   void keyboard_matrix_r(int offs);
189   void machine_reset_common_disk();
190   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
183191   required_device<cpu_device> m_maincpu;
184192   required_device<z80pio_device> m_pio;
185193   required_device<cassette_image_device> m_cassette;
r243359r243360
192200   optional_device<floppy_connector> m_floppy0;
193201   optional_device<floppy_connector> m_floppy1;
194202   optional_device<mc146818_device> m_rtc;
195   required_memory_bank m_boot;
203   optional_memory_bank m_boot;
196204   optional_memory_bank m_pak;
197205   optional_memory_bank m_telcom;
198206   optional_memory_bank m_basic;
r243359r243360
222230   optional_ioport m_io_x13;
223231   optional_ioport m_io_x14;
224232   required_device<screen_device> m_screen;
225public:
226   required_device<palette_device> m_palette;
227
228   void machine_reset_common_disk();
229   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
230233};
231234
232235#endif /* MBEE_H_ */
trunk/src/mess/machine/mbee.c
r243359r243360
8989
9090*************************************************************************************/
9191
92WRITE_LINE_MEMBER( mbee_state::fdc_intrq_w )
93{
94   m_fdc_rq = (m_fdc_rq & 2) | state;
95}
96
97WRITE_LINE_MEMBER( mbee_state::fdc_drq_w )
98{
99   m_fdc_rq = (m_fdc_rq & 1) | (state << 1);
100}
101
92102READ8_MEMBER( mbee_state::mbee_fdc_status_r )
93103{
94104/*  d7 indicate if IRQ or DRQ is occuring (1=happening)
95105    d6..d0 not used */
96106
97   return 0x7f | ((m_fdc->intrq_r() || m_fdc->drq_r()) ? 0x80 : 0);
107   return m_fdc_rq ? 0xff : 0x7f;
98108}
99109
100110WRITE8_MEMBER( mbee_state::mbee_fdc_motor_w )
r243359r243360
131141TIMER_CALLBACK_MEMBER(mbee_state::mbee256_kbd)
132142{
133143   /* Keyboard scanner is a Mostek M3870 chip. Its speed of operation is determined by a 15k resistor on
134   pin 2 (XTL2) and is therefore unknown. If a key change is detected (up or down), the /strobe
144   pin 2 (XTL2) and is therefore 2MHz. If a key change is detected (up or down), the /strobe
135145   line activates, sending a high to bit 1 of port 2 (one of the pio input lines). The next read of
136146   port 18 will clear this line, and read the key scancode. It will also signal the 3870 that the key
137147   data has been read, on pin 38 (/extint). The 3870 can cache up to 9 keys. With no rom dump
r243359r243360
256266
257267    256TC Memory Banking
258268
259    Bits 0, 1 and 5 select which bank goes into 0000-7FFF.
260    Bit 2 disables ROM, replacing it with RAM.
261    Bit 3 disables Video, replacing it with RAM.
262    Bit 4 switches the video circuits between F000-FFFF and
263          8000-8FFF.
269    Selection of ROM, RAM, and video access by the CPU is controlled by U39,
270    a PAL14L8. When read as an ordinary rom it is 16k in size. The dumper has
271    arranged the pins as (bit0,1,..) (input = 1,23,2,3,4,5,6,7,8,9,10,11,14,13)
272    and (output = 22,21,20,19,18,17,16,15). The prom is also used to control
273    the refresh required by the dynamic rams, however we ignore this function.
264274
265    In case of a clash, video overrides ROM which overrides RAM.
266
267275************************************************************/
268276
269WRITE8_MEMBER( mbee_state::mbee256_50_w )
277void mbee_state::mbee256_setup_banks(UINT8 data)
270278{
279   data &= 0x3f; // U28 (bits 0-5 are referred to as S0-S5)
271280   address_space &mem = m_maincpu->space(AS_PROGRAM);
281   UINT8 *prom = memregion("proms")->base();
282   UINT8 b_data = BITSWAP8(data, 7,5,3,2,4,6,1,0) & 0x3b; // arrange data bits to S0,S1,-,S4,S2,S3
283   UINT8 b_bank, b_byte, b_byte_t, b_addr;
284   UINT16 b_vid;
285   char banktag[10];
272286
273   // primary low banks
274   m_boot->set_entry((data & 3) | ((data & 0x20) >> 3));
275   m_bank1->set_entry((data & 3) | ((data & 0x20) >> 3));
287   for (b_bank = 0; b_bank < 16; b_bank++)
288   {
289      b_vid = b_bank << 12;
290      mem.unmap_readwrite (b_vid, b_vid + 0xfff);
291      b_addr = BITSWAP8(b_bank, 7,4,5,3,1,2,6,0) & 0x1f; // arrange address bits to A12,-,A14,A13,A15
276292
277   // 9000-EFFF
278   m_bank9->set_entry((data & 4) ? 1 : 0);
293      // Calculate read-bank
294      b_byte_t = prom[b_addr | (b_data << 8) | 0x82]; // read-bank (RDS and MREQ are low, RFSH is high)
295      b_byte = BITSWAP8(b_byte_t, 7,5,0,3,6,2,1,4); // rearrange so that bits 0-2 are rambank, bit 3 = rom select, bit 4 = video select, others not used
296      if (!BIT(data, 5))
297         b_byte &= 0xfb;  // U42/1 - S17 only valid if S5 is on
298      if (!BIT(b_byte, 4))
299      {
300         // select video
301         mem.install_read_handler (b_vid, b_vid + 0x7ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this));
302         mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this));
303      }
304      else
305      {
306         sprintf(banktag, "bankr%d", b_bank);
307         mem.install_read_bank( b_vid, b_vid+0xfff, banktag );
279308
280   // 8000-8FFF, F000-FFFF
281   mem.unmap_readwrite (0x8000, 0x87ff);
282   mem.unmap_readwrite (0x8800, 0x8fff);
283   mem.unmap_readwrite (0xf000, 0xf7ff);
284   mem.unmap_readwrite (0xf800, 0xffff);
309         if (!BIT(b_byte, 3))
310            membank(banktag)->set_entry(64 + (b_bank & 3)); // read from rom
311         else
312            membank(banktag)->set_entry((b_bank & 7) | ((b_byte & 7) << 3)); // ram
313      }
285314
286   switch (data & 0x1c)
287   {
288      case 0x00:
289         mem.install_read_bank (0x8000, 0x87ff, "bank8l");
290         mem.install_read_bank (0x8800, 0x8fff, "bank8h");
291         mem.install_readwrite_handler (0xf000, 0xf7ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
292         mem.install_readwrite_handler (0xf800, 0xffff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
293         m_bank8l->set_entry(0); // rom
294         m_bank8h->set_entry(0); // rom
295         break;
296      case 0x04:
297         mem.install_read_bank (0x8000, 0x87ff, "bank8l");
298         mem.install_read_bank (0x8800, 0x8fff, "bank8h");
299         mem.install_readwrite_handler (0xf000, 0xf7ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
300         mem.install_readwrite_handler (0xf800, 0xffff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
301         m_bank8l->set_entry(1); // ram
302         m_bank8h->set_entry(1); // ram
303         break;
304      case 0x08:
305      case 0x18:
306         mem.install_read_bank (0x8000, 0x87ff, "bank8l");
307         mem.install_read_bank (0x8800, 0x8fff, "bank8h");
308         mem.install_read_bank (0xf000, 0xf7ff, "bankfl");
309         mem.install_read_bank (0xf800, 0xffff, "bankfh");
310         m_bank8l->set_entry(0); // rom
311         m_bank8h->set_entry(0); // rom
312         m_bankfl->set_entry(0); // ram
313         m_bankfh->set_entry(0); // ram
314         break;
315      case 0x0c:
316      case 0x1c:
317         mem.install_read_bank (0x8000, 0x87ff, "bank8l");
318         mem.install_read_bank (0x8800, 0x8fff, "bank8h");
319         mem.install_read_bank (0xf000, 0xf7ff, "bankfl");
320         mem.install_read_bank (0xf800, 0xffff, "bankfh");
321         m_bank8l->set_entry(1); // ram
322         m_bank8h->set_entry(1); // ram
323         m_bankfl->set_entry(0); // ram
324         m_bankfh->set_entry(0); // ram
325         break;
326      case 0x10:
327      case 0x14:
328         mem.install_readwrite_handler (0x8000, 0x87ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
329         mem.install_readwrite_handler (0x8800, 0x8fff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this), write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
330         mem.install_read_bank (0xf000, 0xf7ff, "bankfl");
331         mem.install_read_bank (0xf800, 0xffff, "bankfh");
332         m_bankfl->set_entry(0); // ram
333         m_bankfh->set_entry(0); // ram
334         break;
315      // Calculate write-bank
316      b_byte_t = prom[b_addr | (b_data << 8) | 0xc0]; // write-bank (XWR and MREQ are low, RFSH is high)
317      b_byte = BITSWAP8(b_byte_t, 7,5,0,3,6,2,1,4); // rearrange so that bits 0-2 are rambank, bit 3 = rom select, bit 4 = video select, others not used
318      if (!BIT(data, 5))
319         b_byte &= 0xfb;  // U42/1 - S17 only valid if S5 is on
320      if (!BIT(b_byte, 4))
321      {
322         // select video
323         mem.install_write_handler (b_vid, b_vid + 0x7ff, write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
324         mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
325      }
326      else
327      {
328         sprintf(banktag, "bankw%d", b_bank);
329         mem.install_write_bank( b_vid, b_vid+0xfff, banktag );
330
331         if (!BIT(b_byte, 3))
332            membank(banktag)->set_entry(64); // write to rom dummy area
333         else
334            membank(banktag)->set_entry((b_bank & 7) | ((b_byte & 7) << 3)); // ram
335      }
335336   }
336337}
337338
339WRITE8_MEMBER( mbee_state::mbee256_50_w )
340{
341   mbee256_setup_banks(data);
342}
343
338344/***********************************************************
339345
340346    128k Memory Banking
r243359r243360
508514
509515void mbee_state::machine_reset_common_disk()
510516{
517   m_fdc_rq = 0;
511518}
512519
513520MACHINE_RESET_MEMBER(mbee_state,mbee)
r243359r243360
533540
534541MACHINE_RESET_MEMBER(mbee_state,mbee128)
535542{
536   address_space &mem = m_maincpu->space(AS_PROGRAM);
543   address_space &mem = m_maincpu->space(AS_IO);
537544   machine_reset_common_disk();
538545   mbee128_50_w(mem,0,0); // set banks to default
539   m_boot->set_entry(4); // boot time
546   m_boot->set_entry(8); // boot time
540547}
541548
542549MACHINE_RESET_MEMBER(mbee_state,mbee256)
543550{
544551   UINT8 i;
545   address_space &mem = m_maincpu->space(AS_PROGRAM);
546552   machine_reset_common_disk();
547553   for (i = 0; i < 15; i++) m_mbee256_was_pressed[i] = 0;
548554   m_mbee256_q_pos = 0;
549   mbee256_50_w(mem,0,0); // set banks to default
550   m_boot->set_entry(8); // boot time
551   timer_set(attotime::from_usec(4), TIMER_MBEE_RESET);
555   mbee256_setup_banks(0); // set banks to default
556   m_maincpu->set_pc(0x8000);
552557}
553558
554559MACHINE_RESET_MEMBER(mbee_state,mbeett)
r243359r243360
690695
691696   RAM = memregion("bootrom")->base();
692697   m_bank9->configure_entry(0, &RAM[0x1000]); // rom
693   m_boot->configure_entry(4, &RAM[0x0000]); // rom at boot for 4usec
698   m_boot->configure_entry(8, &RAM[0x0000]); // rom at boot for 4usec
694699   m_bank8l->configure_entry(0, &RAM[0x0000]); // rom
695700   m_bank8h->configure_entry(0, &RAM[0x0800]); // rom
696701
r243359r243360
699704
700705DRIVER_INIT_MEMBER(mbee_state,mbee256)
701706{
702   UINT8 *RAM = memregion("maincpu")->base();
703   m_boot->configure_entries(0, 8, &RAM[0x0000], 0x8000); // standard banks 0000
704   m_bank1->configure_entries(0, 8, &RAM[0x1000], 0x8000); // standard banks 1000
705   m_bank8l->configure_entry(1, &RAM[0x0000]); // shadow ram
706   m_bank8h->configure_entry(1, &RAM[0x0800]); // shadow ram
707   m_bank9->configure_entry(1, &RAM[0x1000]); // shadow ram
708   m_bankfl->configure_entry(0, &RAM[0xf000]); // shadow ram
709   m_bankfh->configure_entry(0, &RAM[0xf800]); // shadow ram
707   UINT8 *RAM = memregion("rams")->base();
708   UINT8 *ROM = memregion("roms")->base();
709   char banktag[10];
710710
711   RAM = memregion("bootrom")->base();
712   m_bank9->configure_entry(0, &RAM[0x1000]); // rom
713   m_boot->configure_entry(8, &RAM[0x0000]); // rom at boot for 4usec
714   m_bank8l->configure_entry(0, &RAM[0x0000]); // rom
715   m_bank8h->configure_entry(0, &RAM[0x0800]); // rom
711   for (UINT8 b_bank = 0; b_bank < 16; b_bank++)
712   {
713      sprintf(banktag, "bankr%d", b_bank);
714      membank(banktag)->configure_entries(0, 64, &RAM[0x0000], 0x1000); // RAM banks
715      membank(banktag)->configure_entries(64, 4, &ROM[0x0000], 0x1000); // rom
716716
717      sprintf(banktag, "bankw%d", b_bank);
718      membank(banktag)->configure_entries(0, 64, &RAM[0x0000], 0x1000); // RAM banks
719      membank(banktag)->configure_entries(64, 1, &ROM[0x4000], 0x1000); // dummy rom
720   }
721
717722   timer_set(attotime::from_hz(1), TIMER_MBEE_RTC_IRQ);   /* timer for rtc */
718   timer_set(attotime::from_hz(25), TIMER_MBEE256_KBD);   /* timer for kbd */
723   timer_set(attotime::from_hz(50), TIMER_MBEE256_KBD);   /* timer for kbd */
719724
720725   m_size = 0x8000;
721726}
trunk/src/osd/sdl/drawsdl.c
r243359r243360
517517
518518   SDL_GetWindowSize(window().m_sdl_window, &window().m_width, &window().m_height);
519519
520   // create renderer
520   // create renderer
521521
522522   if (video_config.waitvsync)
523523      m_sdl_renderer = SDL_CreateRenderer(window().m_sdl_window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
trunk/src/osd/windows/vconv.c
r243359r243360
7878   // warning C4146: unary minus operator applied to unsigned type, result still unsigned
7979   // warning C4150: deletion of pointer to incomplete type 'xxx'; no destructor called
8080   // warning C4189: 'xxx' : local variable is initialized but not referenced
81   // warning C4191: 'type cast' : unsafe conversion from 'xxx' to 'xxx' // 64-bit only
8182   // warning C4201: nonstandard extension used : nameless struct/union
8283   // warning C4242: 'x' : conversion from 'xxx' to 'xxx', possible loss of data
8384   // warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
8485   // warning C4250: 'xxx' : inherits 'xxx' via dominance
8586   // warning C4255: 'xxx' : no function prototype given: converting '()' to '(void)'
8687   // warning C4296: 'x' : expression is always false
88   // warning C4306: 'xxx': conversion from 'type1' to 'type2' of greater size // 64-bit only
8789   // warning C4310: cast truncates constant value
8890   // warning C4324: 'xxx' : structure was padded due to __declspec(align())
8991   // warning C4347: behavior change: 'xxx' is called instead of 'xxx' // obsolete VS2005 - VS2010 only
r243359r243360
9193   // warning C4510: 'xxx' : default constructor could not be generated
9294   // warning C4512: 'xxx' : assignment operator could not be generated
9395   // warning C4514: 'xxx' : unreferenced inline function has been removed
96   // warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
9497   // warning C4619: #pragma warning : there is no warning number 'xxx'
9598   // warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
9699   // warning C4610: struct 'xxx' can never be instantiated - user defined constructor required
97100   // warning C4625: 'xxx' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted
98101   // warning C4626: 'xxx' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted
102   // warning C4640: 'xxx' : construction of local static object is not thread-safe
99103   // warning C4668: 'xxx' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
100104   // warning C4702: unreachable code
101105   // warning C4706: assignment within conditional expression
r243359r243360
104108   // warning C4805: 'x' : unsafe mix of type 'xxx' and type 'xxx' in operation
105109   // warning C4820: 'xxx' : 'x' bytes padding added after data member 'xxx'
106110   // warning C4826: Conversion from 'type1 ' to 'type_2' is sign-extended. This may cause unexpected runtime behavior. // 32-bit only
107   { VS7,      "-Wall",                    "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4201 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4310 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4619 /wd4625 /wd4626 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" },
111   { VS7,      "-Wall",                    "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4191 /wd4201 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4306 /wd4310 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4611 /wd4619 /wd4625 /wd4626 /wd4640 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" },
108112   { 0,        "-Wall",                    "/W0" },
109113   { VS7,      "-Wno-unused",              "/wd4100 /wd4101 /wd4102 /wd4505" },
110114   { 0,        "-Wno-sign-compare",        "/wd4365 /wd4389 /wd4245 /wd4388" },
trunk/src/osd/windows/winprefix.h
r243359r243360
1313#ifdef _MSC_VER
1414#include <assert.h>
1515#include <malloc.h>
16#if _MSC_VER < 1500 // < VS2008
17#define vsnprintf _vsnprintf
18#elif _MSC_VER < 1800 // < VS2013
16#if _MSC_VER < 1900 // < VS2015
17#define snprintf _snprintf
18#if _MSC_VER < 1800 // VS2013 or earlier
1919#define alloca _alloca
2020#define round(x) floor((x) + 0.5)
2121#define strtoll _strtoi64
r243359r243360
2424static __inline double fmin(double x, double y){ return (x < y) ? x : y; }
2525static __inline double fmax(double x, double y){ return (x > y) ? x : y; }
2626static __inline double log2(double x) { return log(x) * M_LOG2E; }
27#elif _MSC_VER < 1900 // < VS2015
28#define snprintf _snprintf
29#else
27#if _MSC_VER < 1500 // VS2008 or earlier
28#define vsnprintf _vsnprintf
29#endif // VS2008
30#endif // VS2013
31#else // VS2015
3032#pragma warning (disable: 4091)
3133#pragma warning (disable: 4267)
3234#pragma warning (disable: 4456 4457 4458 4459)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team