Previous 199869 Revisions Next

r29367 Sunday 6th April, 2014 at 13:48:05 UTC by smf
MESS: coco uses rs232 port instead of bitbanger [smf]
[src/mess/drivers]coco12.c coco3.c
[src/mess/includes]coco.h
[src/mess/machine]coco.c

trunk/src/mess/drivers/coco12.c
r29366r29367
293293   MCFG_SAM6883_ADD(SAM_TAG, XTAL_3_579545MHz, coco12_state::sam6883_config)
294294   MCFG_SAM6883_RES_CALLBACK(READ8(coco12_state, sam_read))
295295   MCFG_CASSETTE_ADD("cassette", coco_state::coco_cassette_interface)
296   MCFG_BITBANGER_ADD(BITBANGER_TAG, coco_state::coco_bitbanger_config)
296
297   MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
298   // default 600 baud?
299
297300   MCFG_COCO_CARTRIDGE_ADD(CARTRIDGE_TAG, coco_state::cartridge_config, coco_cart, "pak")
298301
299302   // video hardware
trunk/src/mess/drivers/coco3.c
r29366r29367
262262   MCFG_PIA_IRQB_HANDLER(WRITELINE(coco_state, pia1_firq_b))
263263
264264   MCFG_CASSETTE_ADD("cassette", coco_state::coco_cassette_interface)
265   MCFG_BITBANGER_ADD(BITBANGER_TAG, coco_state::coco_bitbanger_config)
265
266   MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
267   // default 600 baud?
268
266269   MCFG_COCO_CARTRIDGE_ADD(CARTRIDGE_TAG, coco_state::cartridge_config, coco_cart, "fdcv11")
267270   MCFG_COCO_VHD_ADD(VHD0_TAG)
268271   MCFG_COCO_VHD_ADD(VHD1_TAG)
trunk/src/mess/machine/coco.c
r29366r29367
8888   m_cococart(*this, CARTRIDGE_TAG),
8989   m_ram(*this, RAM_TAG),
9090   m_cassette(*this, "cassette"),
91   m_bitbanger(*this, BITBANGER_TAG),
91   m_rs232(*this, RS232_TAG),
9292   m_vhd_0(*this, VHD0_TAG),
9393   m_vhd_1(*this, VHD1_TAG)
9494{
r29366r29367
479479      || (ram_size >= 0x8000 && (m_pia_0->b_output() & 0x80));
480480
481481   // serial in (PB0)
482   bool serial_in = (m_bitbanger != NULL) && (m_bitbanger->input() ? true : false);
482   bool serial_in = (m_rs232 != NULL) && (m_rs232->rxd_r() ? true : false);
483483
484484   // composite the results
485485   return (memory_sense ? 0x04 : 0x00)
r29366r29367
963963   else
964964   {
965965      /* output bitbanger if present (only on CoCos) */
966      if (m_bitbanger != NULL)
966      if (m_rs232 != NULL)
967967      {
968         m_bitbanger->output(prinout ? 1 : 0);
968         m_rs232->write_txd(prinout ? 1 : 0);
969969      }
970970   }
971971}
r29366r29367
10201020
10211021
10221022//-------------------------------------------------
1023//  bitbanger_changed
1024//-------------------------------------------------
1025
1026void coco_state::bitbanger_changed(bool newvalue)
1027{
1028   // do nothing
1029}
1030
1031
1032
1033//-------------------------------------------------
1034//  bitbanger_callback
1035//-------------------------------------------------
1036
1037WRITE_LINE_MEMBER( coco_state::bitbanger_callback )
1038{
1039   bitbanger_changed(state ? true : false);
1040}
1041
1042
1043
1044//-------------------------------------------------
1045//  bitbanger_config
1046//-------------------------------------------------
1047
1048const bitbanger_config coco_state::coco_bitbanger_config =
1049{
1050   DEVCB_DRIVER_LINE_MEMBER(coco_state, bitbanger_callback),   /* callback */
1051   BITBANGER_PRINTER,                                          /* default mode */
1052   BITBANGER_600,                                              /* default output baud */
1053   BITBANGER_0PERCENT                                          /* default fine tune adjustment */
1054};
1055
1056
1057
1058//-------------------------------------------------
10591023//  poll_hires_joystick
10601024//-------------------------------------------------
10611025
trunk/src/mess/includes/coco.h
r29366r29367
1414
1515#include "emu.h"
1616#include "imagedev/cassette.h"
17#include "imagedev/bitbngr.h"
17#include "bus/rs232/rs232.h"
1818#include "machine/6821pia.h"
1919#include "bus/coco/cococart.h"
2020#include "machine/coco_vhd.h"
r29366r29367
4747#define SCREEN_TAG                  "screen"
4848#define DAC_TAG                     "dac"
4949#define CARTRIDGE_TAG               "ext"
50#define BITBANGER_TAG               "bitbanger"
50#define RS232_TAG                   "rs232"
5151#define VHD0_TAG                    "vhd0"
5252#define VHD1_TAG                    "vhd1"
5353
r29366r29367
9292   required_device<cococart_slot_device> m_cococart;
9393   required_device<ram_device> m_ram;
9494   required_device<cassette_image_device> m_cassette;
95   optional_device<bitbanger_device> m_bitbanger;
95   optional_device<rs232_port_device> m_rs232;
9696   optional_device<coco_vhd_image_device> m_vhd_0;
9797   optional_device<coco_vhd_image_device> m_vhd_1;
9898
9999   static const cococart_interface cartridge_config;
100   static const bitbanger_config coco_bitbanger_config;
101100   static const cassette_interface coco_cassette_interface;
102101
103102   // driver update handlers
104103   DECLARE_INPUT_CHANGED_MEMBER(keyboard_changed);
105104   DECLARE_INPUT_CHANGED_MEMBER(joystick_mode_changed);
106   static void bitbanger_callback(running_machine &machine, UINT8 bit);
107105
108106   // IO
109107   virtual DECLARE_READ8_MEMBER( ff00_read );
r29366r29367
151149   // changed handlers
152150   virtual void pia1_pa_changed(void);
153151   virtual void pia1_pb_changed(void);
154   virtual void bitbanger_changed(bool newvalue);
155152
156153   // miscellaneous
157154   virtual void update_keyboard_input(UINT8 value, UINT8 z);
r29366r29367
214211   void poll_hires_joystick(void);
215212   void update_cassout(int cassout);
216213   void update_prinout(bool prinout);
217   DECLARE_WRITE_LINE_MEMBER( bitbanger_callback );
218214   void diecom_lightgun_clock(void);
219215
220216   // thin wrappers for PIA output

Previous 199869 Revisions Next


© 1997-2024 The MAME Team