Previous 199869 Revisions Next

r19391 Friday 7th December, 2012 at 16:05:36 UTC by Curt Coder
(MESS) Cleanup. (nw)
[src/mess/drivers]abc1600.c mpz80.c pc1512.c tiki100.c trs80m2.c xor100.c
[src/mess/includes]abc1600.h abc80.h mikromik.h mpz80.h pc1512.h prof80.h tiki100.h tmc600.h trs80m2.h v1050.h xor100.h
[src/mess/machine]64h156.c 64h156.h adam_fdc.c adam_fdc.h cbmipt.c comx_fd.c comx_ram.c comx_ram.h wangpc_emb.c wangpc_emb.h wangpc_lvc.c wangpc_lvc.h wangpc_mvc.c wangpc_mvc.h wangpc_rtc.c wangpc_rtc.h wangpc_tig.c wangpc_tig.h
[src/mess/video]abc1600.c abc80.c crtc_ega.h pc1512.c pc1640.c tmc600.c v1050.c

trunk/src/mess/machine/wangpc_rtc.c
r19390r19391
265265   m_dmac(*this, AM9517A_TAG),
266266   m_ctc0(*this, Z80CTC_0_TAG),
267267   m_ctc1(*this, Z80CTC_1_TAG),
268   m_sio(*this, Z80SIO_TAG)
268   m_sio(*this, Z80SIO_TAG),
269   m_char_ram(*this, "char_ram")
269270{
270271}
271272
r19390r19391
276277
277278void wangpc_rtc_device::device_start()
278279{
280   m_char_ram.allocate(0x100);
279281}
280282
281283
trunk/src/mess/machine/wangpc_rtc.h
r19390r19391
5858   required_device<z80ctc_device> m_ctc0;
5959   required_device<z80ctc_device> m_ctc1;
6060   required_device<z80dart_device> m_sio;
61
62   UINT8 m_char_ram[256];
61   optional_shared_ptr<UINT8> m_char_ram;
6362};
6463
6564
trunk/src/mess/machine/cbmipt.c
r19390r19391
10471047   SLOT_INTERFACE("c1581", C1581)
10481048   SLOT_INTERFACE("cmdhd", CMD_HD)
10491049   SLOT_INTERFACE("fd2000", FD2000)
1050   SLOT_INTERFACE("fd4000", FD4000)
10501051   SLOT_INTERFACE("interpod", INTERPOD)
10511052   SLOT_INTERFACE("minichief", MINI_CHIEF)
10521053   SLOT_INTERFACE("serialbox", SERIAL_BOX)
trunk/src/mess/machine/64h156.c
r19390r19391
388388      device_execute_interface(mconfig, *this),
389389      m_icount(0),
390390     m_image(*this->owner(), FLOPPY_0),
391     m_track_buffer(*this, "track_buffer"),
392     m_speed_buffer(*this, "speed_buffer"),
391393     m_side(0),
392     m_track_buffer(NULL),
393394     m_track_len(0),
394395     m_buffer_pos(0),
395396     m_bit_pos(0),
r19390r19391
429430   m_icountptr = &m_icount;
430431
431432   // allocate track buffer
432   m_track_buffer = auto_alloc_array(machine(), UINT8, G64_BUFFER_SIZE);
433   m_speed_buffer = auto_alloc_array(machine(), UINT8, G64_SPEED_BLOCK_SIZE);
433   m_track_buffer.allocate(G64_BUFFER_SIZE);
434   m_speed_buffer.allocate(G64_SPEED_BLOCK_SIZE);
434435
435436   // resolve callbacks
436437   m_out_atn_func.resolve(m_out_atn_cb, *this);
r19390r19391
440441   // register for state saving
441442   save_item(NAME(m_shift));
442443   save_item(NAME(m_side));
443   save_pointer(NAME(m_track_buffer), G64_BUFFER_SIZE);
444   save_pointer(NAME(m_speed_buffer), G64_SPEED_BLOCK_SIZE);
445444   save_item(NAME(m_track_len));
446445   save_item(NAME(m_buffer_pos));
447446   save_item(NAME(m_bit_pos));
trunk/src/mess/machine/64h156.h
r19390r19391
145145   devcb_resolved_write_line   m_out_byte_func;
146146
147147   required_device<legacy_floppy_image_device> m_image;
148   optional_shared_ptr<UINT8> m_track_buffer;               // track data buffer
149   optional_shared_ptr<UINT8> m_speed_buffer;               // speed block buffer
148150
149151   // track
150152   UINT16 m_shift;
151153   int m_side;                        // disk side
152   UINT8 *m_track_buffer;               // track data buffer
153   UINT8 *m_speed_buffer;               // speed block buffer
154154   int m_track_len;                  // track length
155155   offs_t m_buffer_pos;               // current byte position within track buffer
156156   int m_bit_pos;                     // current bit position within track buffer byte
trunk/src/mess/machine/wangpc_lvc.c
r19390r19391
189189   device_t(mconfig, WANGPC_LVC, "Wang PC Low Resolution Video Card", tag, owner, clock),
190190   device_wangpcbus_card_interface(mconfig, *this),
191191   m_crtc(*this, MC6845_TAG),
192   m_video_ram(*this, "video_ram"),
192193   m_option(0),
193194   m_irq(CLEAR_LINE)
194195{
r19390r19391
202203void wangpc_lvc_device::device_start()
203204{
204205   // allocate memory
205   m_video_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE);
206   m_video_ram.allocate(RAM_SIZE);
206207
207208   // state saving
208   save_pointer(NAME(m_video_ram), RAM_SIZE);
209209   save_item(NAME(m_option));
210210   save_item(NAME(m_scroll));
211211   save_item(NAME(m_irq));
trunk/src/mess/machine/wangpc_lvc.h
r19390r19391
5454private:
5555   inline void set_irq(int state);
5656
57   // internal state
5857   required_device<mc6845_device> m_crtc;
58   optional_shared_ptr<UINT16> m_video_ram;
5959
6060   rgb_t m_palette[16];
61   UINT16 *m_video_ram;
6261   UINT8 m_option;
6362   UINT16 m_scroll;
6463   int m_irq;
trunk/src/mess/machine/wangpc_tig.c
r19390r19391
206206//  screen_update -
207207//-------------------------------------------------
208208
209UINT32 wangpc_tig_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
209UINT32 wangpc_tig_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
210210{
211211   m_hgdc0->screen_update(screen, bitmap, cliprect);
212212   m_hgdc1->screen_update(screen, bitmap, cliprect);
trunk/src/mess/machine/wangpc_tig.h
r19390r19391
3535   // optional information overrides
3636   virtual const rom_entry *device_rom_region() const;
3737   virtual machine_config_constructor device_mconfig_additions() const;
38   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
38   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
3939
4040protected:
4141   // device-level overrides
trunk/src/mess/machine/comx_ram.c
r19390r19391
3636
3737comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3838   device_t(mconfig, COMX_RAM, "COMX-35 RAM Card", tag, owner, clock),
39   device_comx_expansion_card_interface(mconfig, *this)
39   device_comx_expansion_card_interface(mconfig, *this),
40   m_ram(*this, "ram")
4041{
4142}
4243
r19390r19391
4748
4849void comx_ram_device::device_start()
4950{
50   m_ram = auto_alloc_array(machine(), UINT8, RAM_SIZE);
51
52   // state saving
53   save_pointer(NAME(m_ram), RAM_SIZE);
51   m_ram.allocate(RAM_SIZE);
5452}
5553
5654
r19390r19391
7371
7472   if (offset >= 0xc000 && offset < 0xd000)
7573   {
76      data = m_ram[(m_ram_bank << 12) | (offset & 0xfff)];
74      data = m_ram[(m_bank << 12) | (offset & 0xfff)];
7775   }
7876
7977   return data;
r19390r19391
8886{
8987   if (offset >= 0xc000 && offset < 0xd000)
9088   {
91      m_ram[(m_ram_bank << 12) | (offset & 0xfff)] = data;
89      m_ram[(m_bank << 12) | (offset & 0xfff)] = data;
9290   }
9391}
9492
r19390r19391
10199{
102100   if (offset == 1)
103101   {
104      m_ram_bank = (data >> 4) & 0x03;
102      m_bank = (data >> 4) & 0x03;
105103   }
106104}
trunk/src/mess/machine/comx_ram.h
r19390r19391
4343   virtual void comx_io_w(address_space &space, offs_t offset, UINT8 data);
4444
4545private:
46   UINT8 *m_ram;
47   int m_ram_bank;
46   optional_shared_ptr<UINT8> m_ram;
47   
48   int m_bank;
4849};
4950
5051
trunk/src/mess/machine/wangpc_mvc.c
r19390r19391
209209   device_t(mconfig, WANGPC_MVC, "Wang PC Medium Resolution Video Card", tag, owner, clock),
210210   device_wangpcbus_card_interface(mconfig, *this),
211211   m_crtc(*this, MC6845_TAG),
212   m_video_ram(*this, "video_ram"),
213   m_char_ram(*this, "char_ram"),
214   m_bitmap_ram(*this, "bitmap_ram"),
212215   m_option(0),
213216   m_irq(CLEAR_LINE)
214217{
r19390r19391
222225void wangpc_mvc_device::device_start()
223226{
224227   // allocate memory
225   m_video_ram = auto_alloc_array(machine(), UINT16, VIDEO_RAM_SIZE);
226   m_char_ram = auto_alloc_array(machine(), UINT16, CHAR_RAM_SIZE);
227   m_bitmap_ram = auto_alloc_array(machine(), UINT16, BITMAP_RAM_SIZE);
228   m_video_ram.allocate(VIDEO_RAM_SIZE);
229   m_char_ram.allocate(CHAR_RAM_SIZE);
230   m_bitmap_ram.allocate(BITMAP_RAM_SIZE);
228231
229232   // state saving
230   save_pointer(NAME(m_video_ram), VIDEO_RAM_SIZE);
231   save_pointer(NAME(m_char_ram), CHAR_RAM_SIZE);
232   save_pointer(NAME(m_bitmap_ram), BITMAP_RAM_SIZE);
233233   save_item(NAME(m_option));
234234   save_item(NAME(m_irq));
235235}
trunk/src/mess/machine/wangpc_mvc.h
r19390r19391
5454private:
5555   inline void set_irq(int state);
5656
57   // internal state
5857   required_device<mc6845_device> m_crtc;
58   optional_shared_ptr<UINT16> m_video_ram;
59   optional_shared_ptr<UINT16> m_char_ram;
60   optional_shared_ptr<UINT16> m_bitmap_ram;
5961
60   UINT16 *m_video_ram;
61   UINT16 *m_char_ram;
62   UINT16 *m_bitmap_ram;
6362   UINT8 m_option;
6463   int m_irq;
6564};
trunk/src/mess/machine/adam_fdc.c
r19390r19391
174174
175175adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
176176   : device_t(mconfig, ADAM_FDC, "Adam FDC", tag, owner, clock),
177      device_adamnet_card_interface(mconfig, *this),
178      m_maincpu(*this, M6801_TAG),
179      m_fdc(*this, WD2793_TAG),
180      m_floppy0(*this, WD2793_TAG":0"),
181      m_ram(*this, "ram"),
182      m_image0(NULL)
177     device_adamnet_card_interface(mconfig, *this),
178     m_maincpu(*this, M6801_TAG),
179     m_fdc(*this, WD2793_TAG),
180     m_floppy0(*this, WD2793_TAG":0"),
181     m_floppy(NULL),
182     m_ram(*this, "ram"),
183     m_sw3(*this, "SW3")
183184{
184185}
185186
r19390r19391
190191
191192void adam_fdc_device::device_start()
192193{
193   m_fdc->setup_intrq_cb(wd2793_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this));
194   m_fdc->setup_intrq_cb(wd_fdc_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this));
194195}
195196
196197
r19390r19391
236237   data |= m_fdc->drq_r() ? 0x04 : 0x00;
237238
238239   // drive select
239   data |= ioport("SW3")->read() << 7;
240   data |= m_sw3->read() << 7;
240241
241242   return data;
242243}
r19390r19391
270271   m_fdc->dden_w(BIT(data, 3));
271272
272273   // drive select
273   m_image0 = NULL;
274   m_floppy = NULL;
274275
275276   if (BIT(data, 5))
276277   {
277      m_image0 = m_floppy0->get_device();
278      m_floppy = m_floppy0->get_device();
278279   }
279280
280   m_fdc->set_floppy(m_image0);
281   m_fdc->set_floppy(m_floppy);
281282
282283   // motor enable
283   if (m_image0) m_image0->mon_w(!BIT(data, 6));
284   if (m_floppy) m_floppy->mon_w(!BIT(data, 6));
284285}
285286
286287
trunk/src/mess/machine/adam_fdc.h
r19390r19391
1515#include "emu.h"
1616#include "cpu/m6800/m6800.h"
1717#include "formats/adam_dsk.h"
18#include "formats/hxcmfm_dsk.h"
19#include "formats/mfi_dsk.h"
20#include "imagedev/floppy.h"
2118#include "machine/adamnet.h"
2219#include "machine/wd_fdc.h"
2320
r19390r19391
6259   required_device<cpu_device> m_maincpu;
6360   required_device<wd2793_t> m_fdc;
6461   required_device<floppy_connector> m_floppy0;
62   floppy_image_device *m_floppy;
6563   required_shared_ptr<UINT8> m_ram;
66
67   floppy_image_device *m_image0;
64   required_ioport m_sw3;
6865};
6966
7067
trunk/src/mess/machine/wangpc_emb.c
r19390r19391
4646
4747wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4848   device_t(mconfig, WANGPC_EMB, "Wang PC-PM031-B", tag, owner, clock),
49   device_wangpcbus_card_interface(mconfig, *this)
49   device_wangpcbus_card_interface(mconfig, *this),
50   m_ram(*this, "ram")
5051{
5152}
5253
r19390r19391
5859void wangpc_emb_device::device_start()
5960{
6061   // allocate memory
61   m_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE);
62   m_ram.allocate(RAM_SIZE);
6263
6364   // state saving
64   save_pointer(NAME(m_ram), RAM_SIZE);
6565   save_item(NAME(m_option));
6666   save_item(NAME(m_parity_error));
6767   save_item(NAME(m_parity_odd));
trunk/src/mess/machine/wangpc_emb.h
r19390r19391
4444   virtual void wangpcbus_aiowc_w(address_space &space, offs_t offset, UINT16 mem_mask, UINT16 data);
4545
4646private:
47   UINT16 *m_ram;
47   optional_shared_ptr<UINT16> m_ram;
4848   UINT16 m_option;
4949   int m_parity_error;
5050   int m_parity_odd;
trunk/src/mess/machine/comx_fd.c
r19390r19391
163163   m_rom = memregion("c000")->base();
164164
165165   // initialize floppy controller
166   m_fdc->setup_intrq_cb(wd1770_t::line_cb(FUNC(comx_fd_device::intrq_w), this));
167   m_fdc->setup_drq_cb(wd1770_t::line_cb(FUNC(comx_fd_device::drq_w), this));
166   m_fdc->setup_intrq_cb(wd_fdc_t::line_cb(FUNC(comx_fd_device::intrq_w), this));
167   m_fdc->setup_drq_cb(wd_fdc_t::line_cb(FUNC(comx_fd_device::drq_w), this));
168168   m_fdc->dden_w(1);
169169
170170   // state saving
trunk/src/mess/includes/tiki100.h
r19390r19391
4040        m_fdc(*this, FD1797_TAG),
4141        m_ram(*this, RAM_TAG),
4242        m_floppy0(*this, FD1797_TAG":0"),
43        m_floppy1(*this, FD1797_TAG":1")
43        m_floppy1(*this, FD1797_TAG":1"),
44        m_video_ram(*this, "video_ram")
4445   { }
4546
4647   required_device<cpu_device> m_maincpu;
r19390r19391
4950   required_device<ram_device> m_ram;
5051   required_device<floppy_connector> m_floppy0;
5152   required_device<floppy_connector> m_floppy1;
53   optional_shared_ptr<UINT8> m_video_ram;
5254
5355   virtual void machine_start();
5456
55   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
57   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
5658
5759   DECLARE_READ8_MEMBER( gfxram_r );
5860   DECLARE_WRITE8_MEMBER( gfxram_w );
r19390r19391
7274   int m_vire;
7375
7476   /* video state */
75   UINT8 *m_video_ram;
7677   UINT8 m_scroll;
7778   UINT8 m_mode;
7879   UINT8 m_palette;
trunk/src/mess/includes/abc1600.h
r19390r19391
7373        m_bus0i(*this, BUS0I_TAG),
7474        m_bus0x(*this, BUS0X_TAG),
7575        m_bus1(*this, BUS1_TAG),
76        m_bus2(*this, BUS2_TAG)
76        m_bus2(*this, BUS2_TAG),
77        m_segment_ram(*this, "segment_ram"),
78        m_page_ram(*this, "page_ram"),
79        m_video_ram(*this, "video_ram")
7780   { }
7881
7982   required_device<cpu_device> m_maincpu;
r19390r19391
9396   required_device<abc1600bus_slot_device> m_bus0x;
9497   required_device<abc1600bus_slot_device> m_bus1;
9598   required_device<abc1600bus_slot_device> m_bus2;
99   optional_shared_ptr<UINT8> m_segment_ram;
100   optional_shared_ptr<UINT16> m_page_ram;
101   optional_shared_ptr<UINT16> m_video_ram;
96102
97103   virtual void machine_start();
98104   virtual void machine_reset();
r19390r19391
196202   // memory access controller
197203   int m_ifc2;
198204   UINT8 m_task;
199   UINT8 m_segment_ram[0x400];
200   UINT16 m_page_ram[0x400];
201205
202206   // DMA
203207   UINT8 m_dmamap[8];
r19390r19391
218222   const UINT8 *m_wrmsk_rom;   // write mask ROM
219223   const UINT8 *m_shinf_rom;   // shifter info ROM
220224   const UINT8 *m_drmsk_rom;   // data read mask ROM
221   UINT16 *m_video_ram;      // video RAM
222225   int m_endisp;            // enable display
223226   int m_clocks_disabled;      // clocks disabled
224227   UINT16 m_gmdi;            // video RAM data latch
r19390r19391
244247   int m_rmc;               // row match count
245248   int m_cmc;               // column match count
246249   int m_amm;               // active mover mask
247   UINT32 screen_update_abc1600(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
248250};
249251
250252
trunk/src/mess/includes/abc80.h
r19390r19391
7171        m_kb(*this, ABC80_KEYBOARD_TAG),
7272        m_ram(*this, RAM_TAG),
7373        m_rs232(*this, RS232_TAG),
74        m_video_ram(*this, "video_ram"),
7475        m_tape_in(1),
7576        m_tape_in_latch(1)
7677   { }
r19390r19391
8384   required_device<abc80_keyboard_device> m_kb;
8485   required_device<ram_device> m_ram;
8586   required_device<rs232_port_device> m_rs232;
87   optional_shared_ptr<UINT8> m_video_ram;
8688
8789   enum
8890   {
r19390r19391
123125   int m_pio_astb;
124126
125127   // video state
126   UINT8 *m_video_ram;
127128   UINT8 m_latch;
128129   int m_blink;
129130
trunk/src/mess/includes/v1050.h
r19390r19391
7878        m_timer_ack(*this, TIMER_ACK_TAG),
7979        m_timer_rst(*this, TIMER_RST_TAG),
8080        m_sasibus(*this, SASIBUS_TAG ":host"),
81        m_video_ram(*this, "video_ram")
81        m_video_ram(*this, "video_ram"),
82        m_attr_ram(*this, "attr_ram")
8283   { }
8384
8485   required_device<cpu_device> m_maincpu;
r19390r19391
99100   required_device<timer_device> m_timer_ack;
100101   required_device<timer_device> m_timer_rst;
101102   required_device<scsicb_device> m_sasibus;
103   required_shared_ptr<UINT8> m_video_ram;
104   optional_shared_ptr<UINT8> m_attr_ram;
102105
103106   virtual void machine_start();
104107   virtual void machine_reset();
r19390r19391
164167   UINT8 m_bank;            // bank register
165168
166169   // video state
167   required_shared_ptr<UINT8> m_video_ram;          // video RAM
168   UINT8 *m_attr_ram;         // attribute RAM
169170   UINT8 m_attr;            // attribute latch
170171
171172   // sasi state
trunk/src/mess/includes/trs80m2.h
r19390r19391
5151        m_floppy3(*this, FD1791_TAG":3"),
5252        m_floppy(NULL),
5353        m_ram(*this, RAM_TAG),
54        m_kb(*this, TRS80M2_KEYBOARD_TAG)
54        m_kb(*this, TRS80M2_KEYBOARD_TAG),
55        m_video_ram(*this, "video_ram")
5556   { }
5657
5758   required_device<cpu_device> m_maincpu;
r19390r19391
6869   floppy_image_device *m_floppy;
6970   required_device<ram_device> m_ram;
7071   required_device<trs80m2_keyboard_device> m_kb;
72   optional_shared_ptr<UINT8> m_video_ram;
7173
7274   virtual void machine_start();
7375   virtual void machine_reset();
r19390r19391
114116   int m_kbirq;
115117
116118   // video state
117   UINT8 *m_video_ram;
118   UINT8 *m_char_rom;
119   const UINT8 *m_char_rom;
119120   int m_blnkvid;
120121   int m_80_40_char_en;
121122   int m_de;
trunk/src/mess/includes/mikromik.h
r19390r19391
6161   required_device<ram_device> m_ram;
6262   required_shared_ptr<UINT8> m_video_ram;
6363
64
6564   virtual void machine_start();
6665   virtual void machine_reset();
6766
6867   virtual void video_start();
69   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
68   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7069
7170   DECLARE_READ8_MEMBER( mmu_r );
7271   DECLARE_WRITE8_MEMBER( mmu_w );
r19390r19391
102101   const UINT8 *m_key_rom;
103102
104103   // video state
105   bitmap_ind16 m_bitmap;
104   bitmap_rgb32 m_bitmap;
106105   const UINT8 *m_char_rom;
107106   int m_llen;
108107
r19390r19391
116115   int m_recall;
117116   int m_dack3;
118117   int m_tc;
119   UINT32 screen_update_mm1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
118   UINT32 screen_update_mm1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
120119   TIMER_DEVICE_CALLBACK_MEMBER(kbclk_tick);
121120   DECLARE_FLOPPY_FORMATS( floppy_formats );
122121};
trunk/src/mess/includes/mpz80.h
r19390r19391
2727        m_ram(*this, RAM_TAG),
2828        m_terminal(*this, TERMINAL_TAG),
2929        m_s100(*this, S100_TAG),
30        m_map_ram(*this, "map_ram"),
3031        m_nmi(1),
3132        m_pint(1),
3233        m_int_pend(0),
r19390r19391
4445   required_device<ram_device> m_ram;
4546   required_device<generic_terminal_device> m_terminal;
4647   required_device<s100_device> m_s100;
48   optional_shared_ptr<UINT8> m_map_ram;
4749
4850   virtual void machine_start();
4951   virtual void machine_reset();
r19390r19391
9496   int m_trap_int;
9597   int m_trap_stop;
9698   int m_trap_aux;
97   UINT8 *m_map_ram;
9899   DECLARE_DRIVER_INIT(mpz80);
99100};
100101
trunk/src/mess/includes/pc1512.h
r19390r19391
88#include "cpu/i86/i86.h"
99#include "cpu/mcs48/mcs48.h"
1010#include "formats/pc_dsk.h"
11#include "formats/mfi_dsk.h"
12#include "imagedev/flopdrv.h"
1311#include "machine/am9517a.h"
1412#include "machine/ctronics.h"
1513#include "machine/ins8250.h"
r19390r19391
5957        m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ),
6058        m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ),
6159        m_bus(*this, ISA_BUS_TAG),
60        m_video_ram(*this, "video_ram"),
6261        m_pit1(0),
6362        m_pit2(0),
6463        m_status1(0),
r19390r19391
9493   required_device<floppy_image_device> m_floppy0;
9594   optional_device<floppy_image_device> m_floppy1;
9695   required_device<isa8_device> m_bus;
96   optional_shared_ptr<UINT8> m_video_ram;
9797
9898   virtual void machine_start();
9999   virtual void machine_reset();
r19390r19391
196196   UINT8 m_printer_control;
197197
198198   // video state
199   UINT8 *m_video_ram;
200   UINT8 *m_char_rom;
199   const UINT8 *m_char_rom;
201200   int m_toggle;
202201   int m_lpen;
203202   int m_blink;
trunk/src/mess/includes/xor100.h
r19390r19391
6969   DECLARE_READ8_MEMBER( prom_disable_r );
7070   DECLARE_WRITE8_MEMBER( baud_w );
7171   DECLARE_WRITE8_MEMBER( i8251_b_data_w );
72   DECLARE_READ8_MEMBER( fdc_r );
73   DECLARE_WRITE8_MEMBER( fdc_w );
7274   DECLARE_READ8_MEMBER( fdc_wait_r );
7375   DECLARE_WRITE8_MEMBER( fdc_dcont_w );
7476   DECLARE_WRITE8_MEMBER( fdc_dsel_w );
trunk/src/mess/includes/tmc600.h
r19390r19391
3131        m_vis(*this, CDP1869_TAG),
3232        m_cassette(*this, CASSETTE_TAG),
3333        m_ram(*this, RAM_TAG),
34        m_page_ram(*this, "page_ram")
34        m_page_ram(*this, "page_ram"),
35        m_color_ram(*this, "color_ram")
3536    { }
3637
3738   required_device<cosmac_device> m_maincpu;
3839   required_device<cdp1869_device> m_vis;
3940   required_device<cassette_image_device> m_cassette;
4041   required_device<ram_device> m_ram;
42   required_shared_ptr<UINT8> m_page_ram;
43   optional_shared_ptr<UINT8> m_color_ram;
4144
4245   virtual void machine_start();
4346
r19390r19391
6063   int m_vismac_bkg_latch;      // background color latch
6164   int m_blink;            // cursor blink
6265
63   required_shared_ptr<UINT8> m_page_ram;         // page memory
64   UINT8 *m_color_ram;         // color memory
65   UINT8 *m_char_rom;         // character generator ROM
66   const UINT8 *m_char_rom;
6667
6768   // keyboard state
6869   int m_keylatch;            // key latch
trunk/src/mess/includes/prof80.h
r19390r19391
77#include "emu.h"
88#include "cpu/z80/z80.h"
99#include "cpu/z80/z80daisy.h"
10#include "imagedev/flopdrv.h"
1110#include "machine/ecbbus.h"
1211#include "machine/ecb_grip.h"
1312#include "machine/ram.h"
r19390r19391
1817#define Z80_TAG         "z1"
1918#define UPD765_TAG      "z38"
2019#define UPD1990A_TAG   "z43"
21#define SCREEN_TAG      "screen"
2220
2321// ------------------------------------------------------------------------
2422
trunk/src/mess/video/abc1600.c
r19390r19391
10511051void abc1600_state::video_start()
10521052{
10531053   // allocate video RAM
1054   m_video_ram = auto_alloc_array(machine(), UINT16, VIDEORAM_SIZE);
1054   m_video_ram.allocate(VIDEORAM_SIZE);
10551055
10561056   // find memory regions
10571057   m_wrmsk_rom = memregion("wrmsk")->base();
r19390r19391
10591059   m_drmsk_rom = memregion("drmsk")->base();
10601060
10611061   // state saving
1062   save_pointer(NAME(m_video_ram), VIDEORAM_SIZE);
10631062   save_item(NAME(m_endisp));
10641063   save_item(NAME(m_clocks_disabled));
10651064   save_item(NAME(m_gmdi));
trunk/src/mess/video/crtc_ega.h
r19390r19391
88#define __CRTC_EGA__
99
1010#include "emu.h"
11#include "machine/devhelpr.h"
1211
1312#define CRTC_EGA_INTERFACE(name) \
1413   const crtc_ega_interface (name) =
trunk/src/mess/video/abc80.c
r19390r19391
180180   m_vsync_on_timer->adjust(screen->time_until_pos(16, 0), 0, screen->frame_period());
181181
182182   // allocate memory
183   m_video_ram = auto_alloc_array(machine(), UINT8, 0x400);
183   m_video_ram.allocate(0x400);
184184
185185   // find memory regions
186186   m_char_rom = memregion("chargen")->base();
trunk/src/mess/video/v1050.c
r19390r19391
5353static MC6845_UPDATE_ROW( v1050_update_row )
5454{
5555   v1050_state *state = device->machine().driver_data<v1050_state>();
56   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
5756
5857   int column, bit;
5958
r19390r19391
8079         /* display blank */
8180         if (attr & V1050_ATTR_BLANK) color = 0;
8281
83         bitmap.pix32(y, x) = palette[color];
82         bitmap.pix32(y, x) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color];
8483
8584         data <<= 1;
8685      }
r19390r19391
108107   NULL
109108};
110109
111/* Palette */
112
113static PALETTE_INIT( v1050 )
114{
115   palette_set_color(machine, 0, RGB_BLACK); /* black */
116   palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */
117   palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */
118}
119
120110/* Video Start */
121111
122112void v1050_state::video_start()
123113{
124114   /* allocate memory */
125   m_attr_ram = auto_alloc_array(machine(), UINT8, V1050_VIDEORAM_SIZE);
115   m_attr_ram.allocate(V1050_VIDEORAM_SIZE);
126116
127117   /* register for state saving */
128118   save_item(NAME(m_attr));
129   save_pointer(NAME(m_attr_ram), V1050_VIDEORAM_SIZE);
130119}
131120
132121/* Machine Drivers */
r19390r19391
141130   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
142131   MCFG_SCREEN_SIZE(640, 400)
143132   MCFG_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
144
145   MCFG_PALETTE_LENGTH(3)
146    MCFG_PALETTE_INIT(v1050)
147133MACHINE_CONFIG_END
trunk/src/mess/video/pc1512.c
r19390r19391
551551   m_char_rom = memregion(AMS40041_TAG)->base();
552552
553553   // allocate memory
554   m_video_ram = auto_alloc_array(machine(), UINT8, 0x10000);
554   m_video_ram.allocate(0x10000);
555555}
556556
557557
trunk/src/mess/video/tmc600.c
r19390r19391
110110void tmc600_state::video_start()
111111{
112112   // allocate memory
113   m_color_ram = auto_alloc_array(machine(), UINT8, TMC600_PAGE_RAM_SIZE);
113   m_color_ram.allocate(TMC600_PAGE_RAM_SIZE);
114114
115115   // find memory regions
116116   m_char_rom = memregion("chargen")->base();
117117
118118   // register for state saving
119   save_pointer(NAME(m_color_ram), TMC600_PAGE_RAM_SIZE);
120
121119   save_item(NAME(m_vismac_reg_latch));
122120   save_item(NAME(m_vismac_color_latch));
123121   save_item(NAME(m_vismac_bkg_latch));
trunk/src/mess/video/pc1640.c
r19390r19391
369369void pc1640_state::video_start()
370370{
371371   // allocate memory
372   m_video_ram = auto_alloc_array(machine(), UINT8, 0x20000);
372   m_video_ram.allocate(0x20000);
373373}
374374
375375
trunk/src/mess/drivers/mpz80.c
r19390r19391
706706
707707void mpz80_state::machine_start()
708708{
709   m_map_ram = auto_alloc_array_clear(machine(), UINT8, 0x200);
709   m_map_ram.allocate(0x200);
710710}
711711
712712
trunk/src/mess/drivers/trs80m2.c
r19390r19391
629629   m_char_rom = memregion(MC6845_TAG)->base();
630630
631631   // allocate memory
632   m_video_ram = auto_alloc_array(machine(), UINT8, 0x800);
632   m_video_ram.allocate(0x800);
633633}
634634
635635UINT32 trs80m2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
trunk/src/mess/drivers/pc1512.c
r19390r19391
10021002      m_dmac->dreq2_w(0);
10031003}
10041004
1005static const floppy_interface floppy_intf =
1006{
1007   DEVCB_NULL,
1008   DEVCB_NULL,
1009   DEVCB_NULL,
1010   DEVCB_NULL,
1011   DEVCB_NULL,
1012   FLOPPY_STANDARD_5_25_DSDD,
1013   LEGACY_FLOPPY_OPTIONS_NAME(pc),
1014   "floppy_5_25",
1015   NULL
1016};
1017
10181005WRITE_LINE_MEMBER( pc1512_state::fdc_int_w )
10191006{
10201007   m_dint = state;
trunk/src/mess/drivers/tiki100.c
r19390r19391
374374
375375/* Video */
376376
377UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
377UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
378378{
379   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
379380   UINT16 addr = (m_scroll << 7);
380381   int sx, y, pixel, mode = (m_mode >> 4) & 0x03;
381382
r19390r19391
392393            {
393394               int x = (sx * 8) + pixel;
394395
395               bitmap.pix16(y, x) = 0;
396               bitmap.pix32(y, x) = palette[0];
396397            }
397398            break;
398399
r19390r19391
402403               int x = (sx * 8) + pixel;
403404               int color = BIT(data, 0);
404405
405               bitmap.pix16(y, x) = color;
406               bitmap.pix32(y, x) = palette[color];
406407
407408               data >>= 1;
408409            }
r19390r19391
414415               int x = (sx * 8) + (pixel * 2);
415416               int color = data & 0x03;
416417
417               bitmap.pix16(y, x) = color;
418               bitmap.pix16(y, x + 1) = color;
418               bitmap.pix32(y, x) = palette[color];
419               bitmap.pix32(y, x + 1) = palette[color];
419420
420421               data >>= 2;
421422            }
r19390r19391
427428               int x = (sx * 8) + (pixel * 4);
428429               int color = data & 0x0f;
429430
430               bitmap.pix16(y, x) = color;
431               bitmap.pix16(y, x + 1) = color;
432               bitmap.pix16(y, x + 2) = color;
433               bitmap.pix16(y, x + 3) = color;
431               bitmap.pix32(y, x) = palette[color];
432               bitmap.pix32(y, x + 1) = palette[color];
433               bitmap.pix32(y, x + 2) = palette[color];
434               bitmap.pix32(y, x + 3) = palette[color];
434435
435436               data >>= 4;
436437            }
r19390r19391
546547void tiki100_state::machine_start()
547548{
548549   /* allocate video RAM */
549   m_video_ram = auto_alloc_array(machine(), UINT8, TIKI100_VIDEORAM_SIZE);
550   m_video_ram.allocate(TIKI100_VIDEORAM_SIZE);
550551
551552   /* setup memory banking */
552553   UINT8 *ram = m_ram->pointer();
r19390r19391
565566   /* register for state saving */
566567   save_item(NAME(m_rome));
567568   save_item(NAME(m_vire));
568   save_pointer(NAME(m_video_ram), TIKI100_VIDEORAM_SIZE);
569569   save_item(NAME(m_scroll));
570570   save_item(NAME(m_mode));
571571   save_item(NAME(m_palette));
r19390r19391
641641/* System Drivers */
642642
643643/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT       INIT    COMPANY             FULLNAME        FLAGS */
644COMP( 1984, kontiki,   0,         0,      tiki100,   tiki100, driver_device,   0,      "Kontiki Data A/S",   "KONTIKI 100",   GAME_SUPPORTS_SAVE )
645COMP( 1984, tiki100,   kontiki,   0,      tiki100,   tiki100, driver_device,   0,      "Tiki Data A/S",   "TIKI 100",      GAME_SUPPORTS_SAVE )
644COMP( 1984, kontiki,   0,         0,      tiki100,   tiki100, driver_device,   0,      "Kontiki Data A/S",   "KONTIKI 100",   GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
645COMP( 1984, tiki100,   kontiki,   0,      tiki100,   tiki100, driver_device,   0,      "Tiki Data A/S",   "TIKI 100",      GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/xor100.c
r19390r19391
159159   m_terminal->write(space, 0, data);
160160}
161161
162READ8_MEMBER( xor100_state::fdc_r )
163{
164   return m_fdc->gen_r(offset) ^ 0xff;
165}
166
167WRITE8_MEMBER( xor100_state::fdc_w )
168{
169   m_fdc->gen_w(offset, data ^ 0xff);
170}
171
162172READ8_MEMBER( xor100_state::fdc_wait_r )
163173{
164174   /*
r19390r19391
178188
179189   if (!m_fdc_irq && !m_fdc_drq)
180190   {
181      /* TODO: this is really connected to the Z80 _RDY line */
182      m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
191      fatalerror("Z80 WAIT not supported by MAME core\n");
192      m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
183193   }
184194
185195   return !m_fdc_irq << 7;
r19390r19391
263273   AM_RANGE(0x0a, 0x0a) AM_READ(prom_disable_r)
264274   AM_RANGE(0x0b, 0x0b) AM_READ_PORT("DSW0") AM_WRITE(baud_w)
265275   AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write)
266   AM_RANGE(0xf8, 0xfb) AM_DEVREADWRITE(WD1795_TAG, fd1795_t, read, write) // TODO inverted data bus
276   AM_RANGE(0xf8, 0xfb) AM_READWRITE(fdc_r, fdc_w)
267277   AM_RANGE(0xfc, 0xfc) AM_READWRITE(fdc_wait_r, fdc_dcont_w)
268278   AM_RANGE(0xfd, 0xfd) AM_WRITE(fdc_dsel_w)
269279ADDRESS_MAP_END
r19390r19391
484494
485495   if (state)
486496   {
487      /* TODO: this is really connected to the Z80 _RDY line */
488      m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
497      fatalerror("Z80 WAIT not supported by MAME core\n");
498      m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
489499   }
490500}
491501
r19390r19391
495505
496506   if (state)
497507   {
498      /* TODO: this is really connected to the Z80 _RDY line */
499      m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
508      fatalerror("Z80 WAIT not supported by MAME core\n");
509      m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
500510   }
501511}
502512
trunk/src/mess/drivers/abc1600.c
r19390r19391
18511851   // interrupt callback
18521852   m_maincpu->set_irq_acknowledge_callback(abc1600_int_ack);
18531853
1854   // allocate memory
1855   m_segment_ram.allocate(0x400);
1856   m_page_ram.allocate(0x400);
1857
18541858   // HACK fill segment RAM with non-zero values or no boot
18551859   memset(m_segment_ram, 0xcd, 0x400);
18561860
18571861   // state saving
18581862   save_item(NAME(m_ifc2));
18591863   save_item(NAME(m_task));
1860   save_item(NAME(m_segment_ram));
1861   save_item(NAME(m_page_ram));
18621864   save_item(NAME(m_dmamap));
18631865   save_item(NAME(m_dmadis));
18641866   save_item(NAME(m_sysscc));

Previous 199869 Revisions Next


© 1997-2024 The MAME Team