Previous 199869 Revisions Next

r18991 Friday 16th November, 2012 at 18:36:01 UTC by Curt Coder
(MESS) bw12: Removed palette and fixed floppy regression. (nw)
[src/mess/drivers]bw12.c
[src/mess/includes]bw12.h

trunk/src/mess/includes/bw12.h
r18990r18991
11#ifndef __BW12__
22#define __BW12__
33
4#include "emu.h"
5#include "cpu/z80/z80.h"
46#include "machine/ram.h"
7#include "formats/bw12_dsk.h"
8#include "formats/hxcmfm_dsk.h"
9#include "formats/imd_dsk.h"
10#include "formats/mfi_dsk.h"
11#include "machine/6821pia.h"
12#include "machine/ctronics.h"
13#include "machine/kb3600.h"
14#include "machine/pit8253.h"
15#include "machine/ram.h"
16#include "machine/rescap.h"
17#include "machine/upd765.h"
18#include "machine/z80dart.h"
19#include "video/mc6845.h"
20#include "sound/dac.h"
521
622#define SCREEN_TAG         "screen"
723#define Z80_TAG            "ic35"
r18990r18991
3147        m_crtc(*this, MC6845_TAG),
3248        m_centronics(*this, CENTRONICS_TAG),
3349        m_ram(*this, RAM_TAG),
34        m_floppy0(*this, UPD765_TAG ":0:525ssdd"),
35        m_floppy1(*this, UPD765_TAG ":1:525ssdd"),
36        m_floppy_timer(*this, FLOPPY_TIMER_TAG)
37   ,
38      m_video_ram(*this, "video_ram"){ }
50        m_floppy0(*this, UPD765_TAG ":0:525dd"),
51        m_floppy1(*this, UPD765_TAG ":1:525dd"),
52        m_floppy_timer(*this, FLOPPY_TIMER_TAG),
53        m_video_ram(*this, "video_ram")
54   { }
3955
4056   required_device<cpu_device> m_maincpu;
4157   required_device<pia6821_device> m_pia;
trunk/src/mess/drivers/bw12.c
r18990r18991
2323
2424****************************************************************************/
2525
26
27#include "emu.h"
28#include "cpu/z80/z80.h"
29#include "machine/ram.h"
30#include "formats/mfi_dsk.h"
31#include "machine/6821pia.h"
32#include "machine/ctronics.h"
33#include "machine/upd765.h"
34#include "machine/pit8253.h"
35#include "machine/rescap.h"
36#include "machine/z80dart.h"
37#include "machine/kb3600.h"
38#include "video/mc6845.h"
39#include "sound/dac.h"
4026#include "includes/bw12.h"
4127
4228/*
r18990r18991
8167
8268void bw12_state::floppy_motor_off()
8369{
84   m_floppy0->mon_w(true);
85   m_floppy1->mon_w(true);
70   m_floppy0->mon_w(1);
71   m_floppy1->mon_w(1);
8672
8773   m_motor_on = 0;
8874}
r18990r18991
9783   if (m_motor0 || m_motor1)
9884   {
9985      m_motor_on = 1;
100      m_floppy_timer->enable(0);
86      m_floppy_timer->enable(false);
10187   }
10288   else
10389   {
r18990r18991
142128
143129      if (data)
144130      {
145         m_floppy0->mon_w(false);
131         m_floppy0->mon_w(0);
146132      }
147133
148134      set_floppy_motor_off_timer();
r18990r18991
153139
154140      if (data)
155141      {
156         m_floppy1->mon_w(false);
142         m_floppy1->mon_w(0);
157143      }
158144
159145      set_floppy_motor_off_timer();
r18990r18991
352338static MC6845_UPDATE_ROW( bw12_update_row )
353339{
354340   bw12_state *state = device->machine().driver_data<bw12_state>();
355   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
356341
357342   int column, bit;
358343
r18990r18991
372357         int x = (column * 8) + bit;
373358         int color = BIT(data, 7);
374359
375         bitmap.pix32(y, x) = palette[color];
360         bitmap.pix32(y, x) = RGB_MONOCHROME_AMBER[color];
376361
377362         data <<= 1;
378363      }
r18990r18991
525510      {
526511         XTAL_1_8432MHz,
527512         DEVCB_NULL,
528         DEVCB_DRIVER_LINE_MEMBER(bw12_state,pit_out0_w)
513         DEVCB_DRIVER_LINE_MEMBER(bw12_state, pit_out0_w)
529514      },
530515      {
531516         XTAL_1_8432MHz,
r18990r18991
618603
619604void bw12_state::machine_reset()
620605{
621   int i;
622
623   for (i = 0; i < 8; i++)
606   for (int i = 0; i < 8; i++)
624607   {
625608      ls259_w(i, 0);
626609   }
627610}
628611
629612static SLOT_INTERFACE_START( bw12_floppies )
630   SLOT_INTERFACE( "525ssdd", FLOPPY_525_SSDD )
613   SLOT_INTERFACE( "525dd", FLOPPY_525_SSDD )
631614SLOT_INTERFACE_END
632615
633616static const floppy_format_type bw12_floppy_formats[] = {
617   FLOPPY_BW12_FORMAT,
618   FLOPPY_IMD_FORMAT,
634619   FLOPPY_MFI_FORMAT,
620   FLOPPY_MFM_FORMAT,
635621   NULL
636622};
637623
638624static SLOT_INTERFACE_START( bw14_floppies )
639   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
625   SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
640626SLOT_INTERFACE_END
641627
642628static const floppy_format_type bw14_floppy_formats[] = {
629   FLOPPY_BW12_FORMAT,
630   FLOPPY_IMD_FORMAT,
643631   FLOPPY_MFI_FORMAT,
632   FLOPPY_MFM_FORMAT,
644633   NULL
645634};
646635
r18990r18991
679668   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
680669
681670   MCFG_GFXDECODE(bw12)
682   MCFG_PALETTE_LENGTH(2)
683   MCFG_PALETTE_INIT(monochrome_amber)
684671
685672   MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/8, bw12_mc6845_interface)
686673
r18990r18991
704691
705692static MACHINE_CONFIG_DERIVED( bw12, common )
706693   /* floppy drives */
707   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", bw12_floppies, "525ssdd", 0, bw12_floppy_formats)
708   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", bw12_floppies, "525ssdd", 0, bw12_floppy_formats)
694   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", bw12_floppies, "525dd", 0, bw12_floppy_formats)
695   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", bw12_floppies, "525dd", 0, bw12_floppy_formats)
709696
710697   // software lists
711698   MCFG_SOFTWARE_LIST_ADD("flop_list", "bw12")
r18990r18991
717704
718705static MACHINE_CONFIG_DERIVED( bw14, common )
719706   /* floppy drives */
720   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", bw14_floppies, "525hd", 0, bw14_floppy_formats)
721   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", bw14_floppies, "525hd", 0, bw14_floppy_formats)
707   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", bw14_floppies, "525dd", 0, bw14_floppy_formats)
708   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", bw14_floppies, "525dd", 0, bw14_floppy_formats)
722709
723710   /* internal ram */
724711   MCFG_RAM_ADD(RAM_TAG)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team