Previous 199869 Revisions Next

r33509 Monday 24th November, 2014 at 10:05:08 UTC by Curt Coder
[MESS] pet: Added skeleton for the CBM 8000 High Speed Graphics (324402-01) card. (nw)
[hash]pet_flop.xml
[src/emu/bus]bus.mak
[src/emu/bus/pet]exp.c hsg.c* hsg.h*

trunk/hash/pet_flop.xml
r242020r242021
711711      </part>
712712   </software>
713713
714   <software name="hsgdemo">
715      <description>CBM 8000 High Speed Graphics Demos</description>
716      <year>198?</year>
717      <publisher>&lt;unknown&gt;</publisher>
718
719      <part name="flop1" interface="floppy_5_25">
720         <dataarea name="flop" size="174848">
721            <rom name="hsg-demos-01.d64" size="174848" crc="203cf196" sha1="465cc52a3a1d26c2c33dbd24a83c77b5c4b407f0" offset="0" />
722         </dataarea>
723      </part>
724
725      <part name="flop2" interface="floppy_5_25">
726         <dataarea name="flop" size="1066496">
727            <rom name="hsg-demos-02.d82" size="1066496" crc="769f91cb" sha1="d1b5b8724eb58cd37403ea36765c060c5c2d7e21" offset="0" />
728         </dataarea>
729      </part>
730   </software>
731
714732</softwarelist>
trunk/src/emu/bus/bus.mak
r242020r242021
646646BUSOBJS += $(BUSOBJ)/pet/diag264_lb_tape.o
647647BUSOBJS += $(BUSOBJ)/pet/exp.o
648648BUSOBJS += $(BUSOBJ)/pet/64k.o
649BUSOBJS += $(BUSOBJ)/pet/hsg.o
649650BUSOBJS += $(BUSOBJ)/pet/superpet.o
650651BUSOBJS += $(BUSOBJ)/pet/user.o
651652BUSOBJS += $(BUSOBJ)/pet/diag.o
trunk/src/emu/bus/pet/exp.c
r242020r242021
196196
197197// slot devices
198198#include "64k.h"
199#include "hsg.h"
199200#include "superpet.h"
200201
201202SLOT_INTERFACE_START( pet_expansion_cards )
202203   SLOT_INTERFACE("64k", PET_64K)
204   SLOT_INTERFACE("hsga", CBM8000_HSG_A)
205   SLOT_INTERFACE("hsgb", CBM8000_HSG_B)
203206   SLOT_INTERFACE("superpet", SUPERPET)
204207SLOT_INTERFACE_END
trunk/src/emu/bus/pet/hsg.c
r0r242021
1// license:BSD-3-Clause
2// copyright-holders:Curt Coder
3/**********************************************************************
4
5    CBM 8000 High Speed Graphics (324402-01) card emulation
6
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10**********************************************************************/
11
12/*
13
14    TODO:
15
16   http://www.6502.org/users/sjgray/computer/hsg/index.html
17
18    - version A (EF9365, 512x512 interlaced, 1 page)
19    - version B (EF9366, 512x256 non-interlaced, 2 pages)
20
21*/
22
23#include "hsg.h"
24
25
26
27//**************************************************************************
28//  MACROS/CONSTANTS
29//**************************************************************************
30
31#define EF9365_TAG  "ef9365"
32#define EF9366_TAG  "ef9366"
33#define SCREEN_TAG  "screen"
34
35
36
37//**************************************************************************
38//  DEVICE DEFINITIONS
39//**************************************************************************
40
41const device_type CBM8000_HSG_A = &device_creator<cbm8000_hsg_a_t>;
42const device_type CBM8000_HSG_B = &device_creator<cbm8000_hsg_b_t>;
43
44
45//-------------------------------------------------
46//  ROM( cbm8000_hsg )
47//-------------------------------------------------
48
49ROM_START( cbm8000_hsg )
50   ROM_REGION( 0x1000, "9000", 0 )
51   ROM_LOAD( "pet_hsg-ud12 on 8032 9000 (2532).bin", 0x0000, 0x1000, CRC(d651bf72) SHA1(d3d68228a5a8ec73fb39be860c00edb0d21bd1a9) )
52
53   ROM_REGION( 0x1000, "a000", 0 )
54   ROM_LOAD( "324381-01 rev b s/w graphi", 0x0000, 0x1000, CRC(c8e3bff9) SHA1(12ed3176ddd632f52e91082ab574adcba2149684) )
55ROM_END
56
57
58//-------------------------------------------------
59//  rom_region - device-specific ROM region
60//-------------------------------------------------
61
62const rom_entry *cbm8000_hsg_t::device_rom_region() const
63{
64   return ROM_NAME( cbm8000_hsg );
65}
66
67
68//-------------------------------------------------
69//  screen_update -
70//-------------------------------------------------
71
72UINT32 cbm8000_hsg_t::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
73{
74   return 0;
75}
76
77
78//-------------------------------------------------
79//  MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_a )
80//-------------------------------------------------
81
82static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_a )
83   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
84   MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, cbm8000_hsg_t, screen_update)
85   MCFG_SCREEN_SIZE(512, 512)
86   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1)
87   MCFG_SCREEN_REFRESH_RATE(25)
88   MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
89
90   //MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 0)
91MACHINE_CONFIG_END
92
93
94//-------------------------------------------------
95//  MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_b )
96//-------------------------------------------------
97
98static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_b )
99   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
100   MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, cbm8000_hsg_t, screen_update)
101   MCFG_SCREEN_SIZE(512, 256)
102   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
103   MCFG_SCREEN_REFRESH_RATE(50)
104   MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
105
106   //MCFG_DEVICE_ADD(EF9366_TAG, EF9366, 0)
107MACHINE_CONFIG_END
108
109
110//-------------------------------------------------
111//  machine_config_additions - device-specific
112//  machine configurations
113//-------------------------------------------------
114
115machine_config_constructor cbm8000_hsg_a_t::device_mconfig_additions() const
116{
117   return MACHINE_CONFIG_NAME( cbm8000_hsg_a );
118}
119
120machine_config_constructor cbm8000_hsg_b_t::device_mconfig_additions() const
121{
122   return MACHINE_CONFIG_NAME( cbm8000_hsg_b );
123}
124
125
126
127//**************************************************************************
128//  LIVE DEVICE
129//**************************************************************************
130
131//-------------------------------------------------
132//  cbm8000_hsg_t - constructor
133//-------------------------------------------------
134
135cbm8000_hsg_t::cbm8000_hsg_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
136   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
137   device_pet_expansion_card_interface(mconfig, *this),
138   m_9000(*this, "9000"),
139   m_a000(*this, "a000")
140{
141}
142
143cbm8000_hsg_a_t::cbm8000_hsg_a_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
144   cbm8000_hsg_t(mconfig, CBM8000_HSG_A, "CBM 8000 High Speed Graphics (A)", tag, owner, clock, "cbm8000_hsg_a", __FILE__)
145   //m_gdc(*this, EF9365_TAG)
146{
147}
148
149cbm8000_hsg_b_t::cbm8000_hsg_b_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
150   cbm8000_hsg_t(mconfig, CBM8000_HSG_B, "CBM 8000 High Speed Graphics (B)", tag, owner, clock, "cbm8000_hsg_b", __FILE__)
151   //m_gdc(*this, EF9366_TAG)
152{
153}
154
155
156//-------------------------------------------------
157//  device_start - device-specific startup
158//-------------------------------------------------
159
160void cbm8000_hsg_t::device_start()
161{
162}
163
164
165//-------------------------------------------------
166//  device_reset - device-specific reset
167//-------------------------------------------------
168
169void cbm8000_hsg_t::device_reset()
170{
171   //m_gdc->reset();
172}
173
174
175//-------------------------------------------------
176//  pet_norom_r - NO ROM read
177//-------------------------------------------------
178
179int cbm8000_hsg_t::pet_norom_r(address_space &space, offs_t offset, int sel)
180{
181   return !(offset >= 0x9000 && offset < 0xaf00);
182}
183
184
185//-------------------------------------------------
186//  pet_bd_r - buffered data read
187//-------------------------------------------------
188
189UINT8 cbm8000_hsg_t::pet_bd_r(address_space &space, offs_t offset, UINT8 data, int &sel)
190{
191   switch (sel)
192   {
193   case pet_expansion_slot_device::SEL9:
194      data = m_9000->base()[offset & 0xfff];
195      break;
196
197   case pet_expansion_slot_device::SELA:
198      if (offset < 0xaf00)
199      {
200         data = m_a000->base()[offset & 0xfff];
201      }
202      else if (offset == 0xaf10)
203      {
204         /*
205
206             bit     description
207
208             0       light pen
209             1
210             2
211             3
212             4
213             5
214             6
215             7
216
217         */
218      }
219      else if (offset == 0xad30)
220      {
221         // hard copy
222      }
223      else if (offset >= 0xaf70 && offset < 0xaf80)
224      {
225         //data = m_gdc->data_r(space, offset & 0x0f);
226      }
227      break;
228   }
229
230   return data;
231}
232
233
234//-------------------------------------------------
235//  pet_bd_w - buffered data write
236//-------------------------------------------------
237
238void cbm8000_hsg_t::pet_bd_w(address_space &space, offs_t offset, UINT8 data, int &sel)
239{
240   if (offset == 0xaf00)
241   {
242      /*
243
244          bit     description
245
246          0       hard copy (0=active)
247          1       operating page select (version B)
248          2
249          3       read-modify-write (1=active)
250          4       display switch (1=graphic)
251          5       display page select (version B)
252          6
253          7
254
255      */
256   }
257   else if (offset >= 0xaf70 && offset < 0xaf80)
258   {
259      //m_gdc->data_w(space, offset & 0x0f, data);
260   }
261}
trunk/src/emu/bus/pet/hsg.h
r0r242021
1// license:BSD-3-Clause
2// copyright-holders:Curt Coder
3/**********************************************************************
4
5    CBM 8000 High Speed Graphics (324402-01) card emulation
6
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10**********************************************************************/
11
12#pragma once
13
14#ifndef __CBM8000_HSG__
15#define __CBM8000_HSG__
16
17#include "emu.h"
18#include "exp.h"
19
20
21
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25
26// ======================> cbm8000_hsg_t
27
28class cbm8000_hsg_t : public device_t,
29                 public device_pet_expansion_card_interface
30{
31public:
32   // construction/destruction
33   cbm8000_hsg_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
34   cbm8000_hsg_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35
36   // optional information overrides
37   virtual const rom_entry *device_rom_region() const;
38
39   // device_pet_expansion_card_interface overrides
40   virtual int pet_norom_r(address_space &space, offs_t offset, int sel);
41   virtual UINT8 pet_bd_r(address_space &space, offs_t offset, UINT8 data, int &sel);
42   virtual void pet_bd_w(address_space &space, offs_t offset, UINT8 data, int &sel);
43
44   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
45
46protected:
47   // device-level overrides
48   virtual void device_start();
49   virtual void device_reset();
50
51private:
52   //required_device<ef9365_device> m_gdc;
53   required_memory_region m_9000;
54   required_memory_region m_a000;
55};
56
57
58// ======================> cbm8000_hsg_a_t
59
60class cbm8000_hsg_a_t :  public cbm8000_hsg_t
61{
62public:
63   // construction/destruction
64   cbm8000_hsg_a_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
65
66   // optional information overrides
67   virtual machine_config_constructor device_mconfig_additions() const;
68};
69
70
71// ======================> cbm8000_hsg_b_t
72
73class cbm8000_hsg_b_t :  public cbm8000_hsg_t
74{
75public:
76   // construction/destruction
77   cbm8000_hsg_b_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
78
79   // optional information overrides
80   virtual machine_config_constructor device_mconfig_additions() const;
81};
82
83
84// device type definition
85extern const device_type CBM8000_HSG_A;
86extern const device_type CBM8000_HSG_B;
87
88
89
90#endif


Previous 199869 Revisions Next


© 1997-2024 The MAME Team