Previous 15994 Revisions Next

r1289 Friday 16th November, 2007 at 15:02:26 UTC by Wilbert Pol
[SVI318] Added support for NTSC models. Fixed borders. Added selectable bioses for all models. Added serial port support. [Tomas Karlsson]
[docs]messnew.txt
[src/mess]messdriv.c
[src/mess/drivers]svi318.c
[src/mess/includes]svi318.h
[src/mess/machine]svi318.c

src/mess/includes/svi318.h
r1288r1289
33*/
44
55DRIVER_INIT( svi318 );
6MACHINE_START( svi318 );
6MACHINE_START( svi318_pal );
7MACHINE_START( svi318_ntsc );
78MACHINE_RESET( svi318 );
89
910DEVICE_INIT( svi318_cart );
r1288r1289
1112DEVICE_UNLOAD( svi318_cart );
1213
1314INTERRUPT_GEN( svi318_interrupt );
14void svi318_vdp_interrupt (int i);
15void svi318_vdp_interrupt(int i);
1516
1617WRITE8_HANDLER( svi318_writemem1 );
1718WRITE8_HANDLER( svi318_writemem2 );
r1288r1289
2728READ8_HANDLER( svi318_psg_port_a_r );
2829
2930DEVICE_LOAD( svi318_cassette );
30int svi318_cassette_present (int id);
31int svi318_cassette_present(int id);
3132
3233READ8_HANDLER( svi318_fdc_irqdrq_r );
3334WRITE8_HANDLER( svi318_fdc_drive_motor_w );
src/mess/messdriv.c
r1288r1289
741741TESTDRIVER( hp48g )      /* HP48 G/GX                              */
742742
743743   /* SpectraVideo */
744   DRIVER( svi318 )   /* SVI-318 (SV BASIC v1.0)                     */
745   DRIVER( svi328 )   /* SVI-328 (SV BASIC v1.1)                     */
744   DRIVER( svi318 )   /* SVI-318 (PAL)                           */
745   DRIVER( svi318n )   /* SVI-318 (NTSC)                           */
746   DRIVER( svi328 )   /* SVI-328 (PAL)                           */
747   DRIVER( svi328n )   /* SVI-328 (NTSC)                           */
746748TESTDRIVER( svi328b )   /* SVI-328 + 80 column card                     */
747749
748750   /* Andrew Donald Booth (this is the name of the designer, not a company) */
src/mess/machine/svi318.c
r1288r1289
44** Sean Young, Tomas Karlsson
55**
66** Todo:
7** - serial ports
7** - modem port
88** - svi_cas format
99** - 80 column cartridge
1010*/
1111
1212#include "driver.h"
13#include "includes/svi318.h"
14#include "cpu/z80/z80.h"
1315#include "video/generic.h"
14#include "cpu/z80/z80.h"
16#include "video/crtc6845.h"
17#include "video/tms9928a.h"
18#include "machine/8255ppi.h"
19#include "machine/uart8250.h"
1520#include "machine/wd17xx.h"
16#include "includes/svi318.h"
17#include "formats/svi_cas.h"
18#include "machine/8255ppi.h"
19#include "video/tms9928a.h"
2021#include "devices/basicdsk.h"
2122#include "devices/printer.h"
2223#include "devices/cassette.h"
24#include "formats/svi_cas.h"
2325#include "sound/dac.h"
2426#include "sound/ay8910.h"
2527#include "image.h"
26#include "video/crtc6845.h"
2728
2829enum {
2930   SVI_INTERNAL   = 0,
r1288r1289
5758
5859static void svi318_set_banks (void);
5960
61/* Serial ports */
62
63static void svi318_uart8250_interrupt(int nr, int state)
64{
65   cpunum_set_input_line(0, 0, (state ? HOLD_LINE : CLEAR_LINE));
66}
67
68static uart8250_interface svi318_uart8250_interface[1] =
69{
70   {
71      TYPE8250,
72      3072000,
73      svi318_uart8250_interrupt,
74      NULL,
75      NULL,
76      NULL
77   },
78};
79
6080/* Cartridge */
6181
6282static int svi318_verify_cart (UINT8 magic[2])
r1288r1289
130150
131151   if (cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)) > 0.0038)
132152      data |= 0x80;
133   if (!svi318_cassette_present(0) )
153   if (!svi318_cassette_present(0))
134154      data |= 0x40;
135155   data |= readinputport(12) & 0x30;
136156
r1288r1289
188208   DAC_signed_data_w (0, val);
189209
190210   /* cassette motor on/off */
191   if (svi318_cassette_present (0) )
211   if (svi318_cassette_present(0))
192212   {
193213      cassette_change_state(
194214         image_from_devtype_and_index(IO_CASSETTE, 0),
r1288r1289
585605
586606/* Init functions */
587607
588void svi318_vdp_interrupt (int i)
608void svi318_vdp_interrupt(int i)
589609{
590610   cpunum_set_input_line(0, 0, (i ? HOLD_LINE : CLEAR_LINE));
591611}
r1288r1289
644664
645665   /* floppy */
646666   wd17xx_init(WD_TYPE_179X, svi_fdc_callback, NULL);
667
668   /* serial */
669   uart8250_init(0, svi318_uart8250_interface);
647670}
648671
649static const TMS9928a_interface tms9928a_interface =
672static const TMS9928a_interface svi318_tms9928a_interface =
650673{
674   TMS99x8A,
675   0x4000,
676   15,
677   15,
678   svi318_vdp_interrupt
679};
680
681static const TMS9928a_interface svi318_tms9929a_interface =
682{
651683   TMS9929A,
652684   0x4000,
653   0, 0,
685   13,
686   13,
654687   svi318_vdp_interrupt
655688};
656689
657MACHINE_START( svi318 )
690MACHINE_START( svi318_ntsc )
658691{
659   TMS9928A_configure(&tms9928a_interface);
692   TMS9928A_configure(&svi318_tms9928a_interface);
660693}
661694
695MACHINE_START( svi318_pal )
696{
697   TMS9928A_configure(&svi318_tms9929a_interface);
698}
699
662700MACHINE_RESET( svi318 )
663701{
664702   /* video stuff */
r1288r1289
671709   svi318_set_banks();
672710
673711   wd17xx_reset();
712
713   uart8250_reset(0);
674714}
675715
676716INTERRUPT_GEN( svi318_interrupt )
r1288r1289
795835
796836/* Cassette */
797837
798int svi318_cassette_present (int id)
838int svi318_cassette_present(int id)
799839{
800840   return image_exists(image_from_devtype_and_index(IO_CASSETTE, id));
801841}
src/mess/drivers/svi318.c
r1288r1289
1010*/
1111
1212#include "driver.h"
13#include "includes/svi318.h"
1314#include "video/generic.h"
15#include "video/tms9928a.h"
1416#include "machine/8255ppi.h"
15#include "video/tms9928a.h"
16#include "includes/svi318.h"
17#include "machine/uart8250.h"
1718#include "machine/wd17xx.h"
1819#include "devices/basicdsk.h"
1920#include "devices/printer.h"
r1288r1289
2930   AM_RANGE( 0xc000, 0xffff) AM_READWRITE( MRA8_BANK3, svi318_writemem3 )
3031ADDRESS_MAP_END
3132
32
33
3433static ADDRESS_MAP_START( svi318_io, ADDRESS_SPACE_IO, 8 )
3534   ADDRESS_MAP_FLAGS( AMEF_UNMAP(0xff) )
3635   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
3736   AM_RANGE( 0x10, 0x11) AM_WRITE( svi318_printer_w )
3837   AM_RANGE( 0x12, 0x12) AM_READ( svi318_printer_r )
38   AM_RANGE( 0x28, 0x2f) AM_READWRITE( uart8250_0_r, uart8250_0_w )
3939   AM_RANGE( 0x30, 0x30) AM_READWRITE( wd17xx_status_r, wd17xx_command_w )
4040   AM_RANGE( 0x31, 0x31) AM_READWRITE( wd17xx_track_r, wd17xx_track_w )
4141   AM_RANGE( 0x32, 0x32) AM_READWRITE( wd17xx_sector_r, wd17xx_sector_w )
r1288r1289
317317   MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
318318   MDRV_INTERLEAVE(1)
319319
320   MDRV_MACHINE_START( svi318 )
320   MDRV_MACHINE_START( svi318_pal )
321321   MDRV_MACHINE_RESET( svi318 )
322322
323323   /* Video hardware */
r1288r1289
334334   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)   
335335MACHINE_DRIVER_END
336336
337static MACHINE_DRIVER_START( svi318n )
338   MDRV_IMPORT_FROM( svi318 )
339   MDRV_SCREEN_REFRESH_RATE(60)
340
341   MDRV_MACHINE_START( svi318_ntsc )
342   MDRV_MACHINE_RESET( svi318 )
343
344   MDRV_IMPORT_FROM( tms9928a )
345MACHINE_DRIVER_END
346
337347static MACHINE_DRIVER_START( svi328b )
338348   MDRV_IMPORT_FROM( svi318 )
339349
r1288r1289
353363
354364***************************************************************************/
355365
356ROM_START (svi318)
357   ROM_REGION (0x10000, REGION_CPU1,0)
358   ROM_LOAD ("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b))
366ROM_START( svi318 )
367   ROM_REGION(0x10000, REGION_CPU1, 0)
368   ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11")
369   ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1))
370   ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1")
371   ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2))
372   ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0")
373   ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3))
359374ROM_END
360375
361ROM_START (svi328)
362   ROM_REGION (0x10000, REGION_CPU1,0)
376ROM_START( svi318n  )
377   ROM_REGION(0x10000, REGION_CPU1, 0)
363378   ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11")
364   ROMX_LOAD ("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1))
379   ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1))
365380   ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1")
366   ROMX_LOAD ("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2))
381   ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2))
382   ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0")
383   ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3))
367384ROM_END
368385
369ROM_START (svi328b)
386ROM_START( svi328 )
387   ROM_REGION(0x10000, REGION_CPU1, 0)
388   ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11")
389   ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1))
390   ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1")
391   ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2))
392   ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0")
393   ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3))
394ROM_END
395
396ROM_START( svi328n )
397   ROM_REGION(0x10000, REGION_CPU1, 0)
398   ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11")
399   ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1))
400   ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1")
401   ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2))
402   ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0")
403   ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3))
404ROM_END
405
406ROM_START( svi328b )
370407   ROM_REGION (0x10000, REGION_CPU1,0)
371408   ROM_LOAD ("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89))
372409   ROM_REGION( 0x1000, REGION_GFX1, 0)
r1288r1289
382419   switch(state)
383420   {
384421      /* --- the following bits of info are returned as 64-bit signed integers --- */
385      case DEVINFO_INT_COUNT:                     info->i = 1; break;
422      case DEVINFO_INT_COUNT:
423         info->i = 1;
424         break;
386425
387      default:                              printer_device_getinfo(devclass, state, info); break;
426      default:
427         printer_device_getinfo(devclass, state, info);
428         break;
388429   }
389430}
390431
r1288r1289
394435   switch(state)
395436   {
396437      /* --- the following bits of info are returned as 64-bit signed integers --- */
397      case DEVINFO_INT_COUNT:                     info->i = 1; break;
438      case DEVINFO_INT_COUNT:
439         info->i = 1;
440         break;
398441
399442      /* --- the following bits of info are returned as pointers to data or functions --- */
400      case DEVINFO_PTR_CASSETTE_FORMATS:            info->p = (void *) svi_cassette_formats; break;
443      case DEVINFO_PTR_CASSETTE_FORMATS:
444         info->p = (void *) svi_cassette_formats;
445         break;
401446
402      default:                              cassette_device_getinfo(devclass, state, info); break;
447      default:
448         cassette_device_getinfo(devclass, state, info);
449         break;
403450   }
404451}
405452
r1288r1289
409456   switch(state)
410457   {
411458      /* --- the following bits of info are returned as 64-bit signed integers --- */
412      case DEVINFO_INT_COUNT:                     info->i = 1; break;
459      case DEVINFO_INT_COUNT:
460         info->i = 1;
461         break;
413462
414463      /* --- the following bits of info are returned as pointers to data or functions --- */
415      case DEVINFO_PTR_INIT:                     info->init = device_init_svi318_cart; break;
416      case DEVINFO_PTR_LOAD:                     info->load = device_load_svi318_cart; break;
417      case DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_svi318_cart; break;
464      case DEVINFO_PTR_INIT:
465         info->init = device_init_svi318_cart;
466         break;
467      case DEVINFO_PTR_LOAD:
468         info->load = device_load_svi318_cart;
469         break;
470      case DEVINFO_PTR_UNLOAD:
471         info->unload = device_unload_svi318_cart;
472         break;
418473
419474      /* --- the following bits of info are returned as NULL-terminated strings --- */
420      case DEVINFO_STR_FILE_EXTENSIONS:            strcpy(info->s = device_temp_str(), "rom"); break;
475      case DEVINFO_STR_FILE_EXTENSIONS:
476         strcpy(info->s = device_temp_str(), "rom");
477         break;
421478
422      default:                              cartslot_device_getinfo(devclass, state, info); break;
479      default:
480         cartslot_device_getinfo(devclass, state, info);
481         break;
423482   }
424483}
425484
r1288r1289
429488   switch(state)
430489   {
431490      /* --- the following bits of info are returned as 64-bit signed integers --- */
432      case DEVINFO_INT_COUNT:                     info->i = 2; break;
491      case DEVINFO_INT_COUNT:
492         info->i = 2;
493         break;
433494
434495      /* --- the following bits of info are returned as pointers to data or functions --- */
435      case DEVINFO_PTR_LOAD:                     info->load = device_load_svi318_floppy; break;
496      case DEVINFO_PTR_LOAD:
497         info->load = device_load_svi318_floppy;
498         break;
436499
437500      /* --- the following bits of info are returned as NULL-terminated strings --- */
438      case DEVINFO_STR_FILE_EXTENSIONS:            strcpy(info->s = device_temp_str(), "dsk"); break;
501      case DEVINFO_STR_FILE_EXTENSIONS:
502         strcpy(info->s = device_temp_str(), "dsk");
503         break;
439504
440      default:                              legacybasicdsk_device_getinfo(devclass, state, info); break;
505      default:
506         legacybasicdsk_device_getinfo(devclass, state, info);
507         break;
441508   }
442509}
443510
444SYSTEM_CONFIG_START(svi318_common)
511SYSTEM_CONFIG_START( svi318_common )
445512   CONFIG_DEVICE(svi318_printer_getinfo)
446513   CONFIG_DEVICE(svi318_cassette_getinfo)
447514   CONFIG_DEVICE(svi318_cartslot_getinfo)
448515   CONFIG_DEVICE(svi318_floppy_getinfo)
449516SYSTEM_CONFIG_END
450517
451SYSTEM_CONFIG_START(svi318)
518SYSTEM_CONFIG_START( svi318 )
452519   CONFIG_IMPORT_FROM(svi318_common)
453520   CONFIG_RAM_DEFAULT(16 * 1024)
454521   CONFIG_RAM( 80 * 1024 )
455522   CONFIG_RAM( 144 * 1024 )
456523SYSTEM_CONFIG_END
457524
458SYSTEM_CONFIG_START(svi328)
525SYSTEM_CONFIG_START( svi328 )
459526   CONFIG_IMPORT_FROM(svi318_common)
460527   CONFIG_RAM_DEFAULT(64 * 1024)
461528   CONFIG_RAM( 128 * 1024 )
r1288r1289
463530SYSTEM_CONFIG_END
464531
465532/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT   INIT    CONFIG  COMPANY         FULLNAME                    FLAGS */
466COMP( 1983, svi318,     0,      0,      svi318,     svi318, svi318, svi318, "Spectravideo", "SVI-318 (SV BASIC v1.0)",  0 )
467COMP( 1983, svi328,     svi318, 0,      svi318,     svi328, svi318, svi328, "Spectravideo", "SVI-328",                  0 )
533COMP( 1983, svi318,     0,      0,      svi318,     svi318, svi318, svi318, "Spectravideo", "SVI-318 (PAL)",            0 )
534COMP( 1983, svi318n,    svi318, 0,      svi318n,    svi318, svi318, svi318, "Spectravideo", "SVI-318 (NTSC)",           0 )
535COMP( 1983, svi328,     svi318, 0,      svi318,     svi328, svi318, svi328, "Spectravideo", "SVI-328 (PAL)",            0 )
536COMP( 1983, svi328n,    svi318, 0,      svi318n,    svi328, svi318, svi328, "Spectravideo", "SVI-328 (NTSC)",           0 )
468537COMP( 1983, svi328b,    svi318, 0,      svi328b,    svi328, svi318, svi328, "Spectravideo", "SVI-328 + 80 column card", GAME_NOT_WORKING )
docs/messnew.txt
r1288r1289
66- Atari STBook [Curt Coder] (not working)
77- HKT-0120 Sega Dreamcast Development Box [incog] (not working)
88- Osborne-1 [Wilbert Pol, Cowering]
9- Spectravideo SVI-318 (NTSC)  [Tomas Karlsson]
10- Spectravideo SVI-328 (NTSC)  [Tomas Karlsson]
911- Synertec Systems Corp. SYM-1  [Dirk Best] (not working)
1012- VG-8020 [incog]
1113
r1288r1289
4648
4749- [QL] Added revision 0.7 of the IPC ROM. [MikeB]
4850
51- [SVI318] Fixed borders. Added selectable bioses for all models.
52  Added serial port support. Added support for NTSC models.  [Tomas Karlsson]
53
4954- [SYM1] Rewrote, still many issues and doesn't fully work.  [Dirk Best]
5055
5156- [X68000] Raster effects, DMA and vblank improvements.  [Barry Rodewald]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team