Previous 15994 Revisions Next

r4314 Friday 20th February, 2009 at 13:34:10 UTC by Dirk Best
[SVI318] Updated to use the new centronics support
[docs]messnew.txt
[src/mess/drivers]svi318.c
[src/mess/machine]svi318.c

src/mess/machine/svi318.c
r4313r4314
1313#include "machine/8255ppi.h"
1414#include "machine/ins8250.h"
1515#include "machine/wd17xx.h"
16#include "machine/ctronics.h"
1617#include "devices/basicdsk.h"
17#include "devices/printer.h"
1818#include "devices/cassette.h"
1919#include "formats/svi_cas.h"
2020#include "sound/dac.h"
r4313r4314
4343   UINT8   bankHigh2_read_only;
4444   /* keyboard */
4545   UINT8   keyboard_row;
46   /* printer */
47   UINT8   prn_data;
48   UINT8   prn_strobe;
4946   /* SVI-806 80 column card */
5047   UINT8   svi806_present;
5148   UINT8   svi806_ram_enabled;
r4313r4314
189186static READ8_DEVICE_HANDLER ( svi318_ppi_port_b_r )
190187{
191188   int row;
192   static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5",
189   static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5",
193190                              "LINE6", "LINE7", "LINE8", "LINE9", "LINE10" };
194191
195192   row = svi.keyboard_row;
r4313r4314
256253   ppi8255_w(device, offset + 2, data);
257254}
258255
259/* Printer port */
260256
261static const device_config *printer_image(running_machine *machine)
262{
263   return devtag_get_device(machine, PRINTER, "printer");
264}
265
266static WRITE8_HANDLER( svi318_printer_w )
267{
268   if (!offset)
269      svi.prn_data = data;
270   else
271   {
272      if ( (svi.prn_strobe & 1) && !(data & 1) )
273         printer_output(printer_image(space->machine), svi.prn_data);
274
275      svi.prn_strobe = data;
276   }
277}
278
279static READ8_HANDLER( svi318_printer_r )
280{
281   return printer_is_ready(printer_image(space->machine)) ? 0xfe:0xff;      /* 0xfe if printer is ready to work */
282}
283
284257/* PSG */
285258
286259/*
r4313r4314
786759READ8_HANDLER( svi318_io_ext_r )
787760{
788761   UINT8 data = 0xff;
789   device_config *fdc = (device_config*)devtag_get_device(space->machine, WD179X, "wd179x");
762   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd179x");
763   const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "centronics");
790764
791765   if (svi.bankLow == SVI_CART) {
792766      return 0xff;
793767   }
794768
795   switch( offset ) {
769   switch( offset )
770   {
796771   case 0x12:
797      data = svi318_printer_r(space, 0);
772      data = 0xfe | centronics_busy_r(printer);
798773      break;
799774
800775   case 0x20:
r4313r4314
846821
847822WRITE8_HANDLER( svi318_io_ext_w )
848823{
849   device_config *fdc = (device_config*)devtag_get_device(space->machine, WD179X, "wd179x");
850   
824   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd179x");
825   const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "centronics");
826
851827   if (svi.bankLow == SVI_CART) {
852828      return;
853829   }
854830
855   switch( offset ) {
831   switch( offset )
832   {
856833   case 0x10:
834      centronics_data_w(printer, 0, data);
835      break;
836
857837   case 0x11:
858      svi318_printer_w(space, offset & 1, data);
838      centronics_strobe_w(printer, BIT(data, 0));
859839      break;
860840
861841   case 0x20:
src/mess/drivers/svi318.c
r4313r4314
1717#include "video/tms9928a.h"
1818#include "machine/8255ppi.h"
1919#include "machine/wd17xx.h"
20#include "machine/ctronics.h"
2021#include "devices/basicdsk.h"
21#include "devices/printer.h"
2222#include "devices/cartslot.h"
2323#include "devices/cassette.h"
2424#include "formats/svi_cas.h"
r4313r4314
106106- "Stop" is mapped to 'End'
107107- "Select" is mapped to 'F11'
108108- "CLS/HM" is mapped to 'Home'
109TODO: How are multiple keys (Copy, Cut, Paste, CLS/HM) expected to
109TODO: How are multiple keys (Copy, Cut, Paste, CLS/HM) expected to
110110behave? Do they need multiple mapping in natural keyboard?
111111*/
112112
r4313r4314
312312   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
313313
314314   /* printer */
315   MDRV_PRINTER_ADD("printer")
315   MDRV_CENTRONICS_ADD("centronics", standard_centronics)
316316
317317   MDRV_CASSETTE_ADD( "cassette", svi318_cassette_config )
318     
318
319319   MDRV_WD179X_ADD("wd179x", svi_wd17xx_interface )
320   
320
321321   MDRV_IMPORT_FROM( svi318_cartslot )
322322MACHINE_DRIVER_END
323323
r4313r4314
391391   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
392392
393393   /* printer */
394   MDRV_PRINTER_ADD("printer")
394   MDRV_CENTRONICS_ADD("centronics", standard_centronics)
395395
396396   MDRV_CASSETTE_ADD( "cassette", svi318_cassette_config )
397   
397
398398   MDRV_WD179X_ADD("wd179x", svi_wd17xx_interface )
399   
399
400400   MDRV_IMPORT_FROM( svi318_cartslot )
401401MACHINE_DRIVER_END
402402
docs/messnew.txt
r4313r4314
6767
6868- [SORDM5] Updated to use the new centronics support.  [Dirk Best]
6969
70- [SVI318] Updated to use the new centronics support.  [Dirk Best]
71
7072- [THOMSON] Updated to use the new centronics support.  [Dirk Best]
7173
7274- [TI81, TI85, TI86] Added the new ROM_DEFAULT_BIOS feature to select the most

Previous 15994 Revisions Next


© 1998-2018 The MESS Team