Previous 15994 Revisions Next

r15605 Sunday 15th July, 2012 at 13:49:16 UTC by Robbbert
BIGBOARD2: added memory banking and beeper.
[src/mess/drivers]bigbord2.c

src/mess/drivers/bigbord2.c
r15604r15605
3535because the system crashes after a while. However it will allow
3636testing and development to continue.
3737
38The FDC has a INTRQ pin, the diagram says it goes to page 6, but
39it just vanishes instead.
40
3841What works:
3942
4043Turn it on, wait for cursor to appear in the top corner. Press Enter.
4144Now you can enter commands. D, M, X are working.
4245
46Memory banking:
47
480000-7FFF are controlled by bit 0 of port C8, and select ROM&video, or RAM
498000-FFFF control if RAM is onboard, or on S100 bus (do not know what controls this)
50We do not emulate the S100, so therefore banks 1&2 are the same as 3&4.
51The switching from port C8 is emulated.
52
53ToDo:
54- Finish floppy disk support (i have no boot disk)
55- Finish the DMA switch in portcc_w.
56- Fix the above problems with the CTC.
57- Finish connecting up the SIO, when it becomes usable.
58- Connect up the SASI, Centronics and other interfaces on ports D8-DB.
59- Connect up the programming port C0-C3.
60- Connect up the numerous board jumpers.
61
4362****************************************************************************/
4463
4564
r15604r15605
5574#include "machine/wd17xx.h"
5675#include "video/mc6845.h"
5776#include "machine/keyboard.h"
77#include "sound/beep.h"
5878
5979#define SCREEN_TAG      "screen"
6080#define Z80_TAG         "u39"
r15604r15605
7898   m_floppy1(*this, FLOPPY_1),
7999   m_floppy2(*this, FLOPPY_2),
80100   m_floppy3(*this, FLOPPY_3),
81   m_videoram(*this, "videoram"),
82   m_attribram(*this, "attribram"){ }
101   m_beeper(*this, BEEPER_TAG)
102   { }
83103
84104   virtual void machine_start();
85105   virtual void machine_reset();
r15604r15605
103123
104124   /* video state */
105125   UINT8 *m_p_chargen;               /* character ROM */
126   UINT8 *m_p_videoram;               /* Video RAM */
127   UINT8 *m_p_attribram;               /* Attribute RAM */
106128
107129   /* floppy state */
108130   bool m_fdc_irq;                  /* interrupt request */
r15604r15605
121143   required_device<device_t> m_floppy1;
122144   required_device<device_t> m_floppy2;
123145   required_device<device_t> m_floppy3;
124   required_shared_ptr<UINT8> m_videoram; /* video RAM */
125   required_shared_ptr<UINT8> m_attribram;
146   required_device<device_t> m_beeper;
126147};
127148
128149/* Status port
r15604r15605
203224/* Read/Write Handlers */
204225
205226
206
207227WRITE8_MEMBER( bigbord2_state::portc8_w )
208228{
209229   /*
r15604r15605
214234
215235        bit     signal      description
216236
217        0       D_S
237        0       D_S         memory bank
218238        1       SIDSEL      side select
219        2       SMC1
220        3       SMC2
239        2       SMC1        u6 data separator pin 5
240        3       SMC2        u6 data separator pin 6
221241        4       DDEN        density
222242        5       HLD         head load
223243        6       MOTOR       disk motor
r15604r15605
227247
228248   m_c8[data&7] = BIT(data, 3);
229249
230   floppy_mon_w(m_floppy0, ~m_c8[6]);
231   floppy_mon_w(m_floppy1, ~m_c8[6]);
232   floppy_mon_w(m_floppy2, ~m_c8[6]);
233   floppy_mon_w(m_floppy3, ~m_c8[6]);
250   switch (data&7)
251   {
252      case 0:
253         // memory bank
254         membank("bankr")->set_entry(m_c8[0]);
255         membank("bankv")->set_entry(m_c8[0]);
256         membank("banka")->set_entry(m_c8[0]);
257         break;
258      case 1:
259         // side select
260         wd17xx_set_side(m_fdc, m_c8[1]);
261         break;
234262
235   /* side select */
236   wd17xx_set_side(m_fdc, m_c8[1]);
237
238   /* density */
239   wd17xx_dden_w(m_fdc, m_c8[4]);
263      case 2:
264      case 3:
265         // these connect to "U6 (FDC9216B)" which drives the fdc "rawread" and "rclk" pins
266         break;
267      case 4:
268         // density
269         wd17xx_dden_w(m_fdc, m_c8[4]);
270         break;
271      case 5:
272         // connects to HLD pin on floppy drive
273         break;
274      case 6:
275         // motor on
276         floppy_mon_w(m_floppy0, ~m_c8[6]);
277         floppy_mon_w(m_floppy1, ~m_c8[6]);
278         floppy_mon_w(m_floppy2, ~m_c8[6]);
279         floppy_mon_w(m_floppy3, ~m_c8[6]);
280         break;
281      case 7:
282         // beeper
283         beep_set_state(m_beeper, m_c8[7]);
284         break;
285   }
240286}
241287
242288WRITE8_MEMBER( bigbord2_state::portcc_w )
r15604r15605
246292        bit     signal      description
247293
248294        0,1,2   operates a 74LS151 for 8 individual inputs to DMA RDY
249          0     W/RDYA
250          1     W/RDYB
295          0     W/RDYA      channel A of SIO
296          1     W/RDYB      channel B of SIO
251297          2     DRQ         DRQ on fdc
252298          3     JB7 pin 1
253299          4     JB7 pin 2
r15604r15605
291337
292338static ADDRESS_MAP_START( bigbord2_mem, AS_PROGRAM, 8, bigbord2_state )
293339   ADDRESS_MAP_UNMAP_HIGH
294   AM_RANGE(0x0000, 0x0fff) AM_ROM
340   AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("bankr")
295341   AM_RANGE(0x1000, 0x5fff) AM_RAM
296   AM_RANGE(0x6000, 0x6fff) AM_RAM AM_SHARE("videoram")
297   AM_RANGE(0x7000, 0x7fff) AM_RAM AM_SHARE("attribram")
342   AM_RANGE(0x6000, 0x6fff) AM_RAMBANK("bankv")
343   AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("banka")
298344   AM_RANGE(0x8000, 0xffff) AM_RAM
299345ADDRESS_MAP_END
300346
r15604r15605
304350   //AM_RANGE(0x84, 0x87) AM_DEVREADWRITE_LEGACY(Z80CTCA_TAG, z80ctc_r, z80ctc_w) //has issues
305351   AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE_LEGACY(Z80CTCB_TAG, z80ctc_r, z80ctc_w)
306352   AM_RANGE(0x8C, 0x8F) AM_DEVREADWRITE_LEGACY(Z80DMA_TAG, z80dma_r, z80dma_w)
353   //AM_RANGE(0xC0, 0xC3)   eprom programming port
307354   AM_RANGE(0xC4, 0xC7) AM_READ(portc4_r)
308355   AM_RANGE(0xC8, 0xCB) AM_WRITE(portc8_w)
309356   AM_RANGE(0xCC, 0xCF) AM_WRITE(portcc_w)
r15604r15605
454501{
455502   /* find memory regions */
456503   m_p_chargen = memregion("chargen")->base();
504   m_p_videoram = memregion(Z80_TAG)->base()+0x6000;
505   m_p_attribram = memregion(Z80_TAG)->base()+0x7000;
457506}
458507
459508
r15604r15605
511560   UINT8 i;
512561   for (i = 0; i < 8; i++)
513562      m_c8[i] = 0;
563   beep_set_state(m_beeper, 0);
564   beep_set_frequency(m_beeper, 950); // actual frequency is unknown
565   membank("bankr")->set_entry(0);
566   membank("bankv")->set_entry(0);
567   membank("banka")->set_entry(0);
514568}
515569
570static DRIVER_INIT( bigbord2 )
571{
572   bigbord2_state *state = machine.driver_data<bigbord2_state>();
573   UINT8 *RAM = state->memregion(Z80_TAG)->base();
574   state->membank("bankr")->configure_entries(0, 2, &RAM[0x0000], 0x10000);
575   state->membank("bankv")->configure_entries(0, 2, &RAM[0x6000], 0x10000);
576   state->membank("banka")->configure_entries(0, 2, &RAM[0x7000], 0x10000);
577}
578
516579static LEGACY_FLOPPY_OPTIONS_START( bigbord2 )
517580   LEGACY_FLOPPY_OPTION( sssd8, "dsk", "8\" SSSD", basicdsk_identify_default, basicdsk_construct_default, NULL,
518581      HEADS([1])
r15604r15605
553616   NULL
554617};
555618
619
556620/* Screen */
557621
558622/* F4 Character Displayer */
r15604r15605
585649   {
586650      inv=0;
587651      mem = (ma + x) & 0x7ff;
588      if (BIT(state->m_attribram[mem], 7)) inv^=0xff;
589      chr = state->m_videoram[mem];
652      if (BIT(state->m_p_attribram[mem], 7)) inv^=0xff;
653      chr = state->m_p_videoram[mem];
590654
591655      /* get pattern of pixels for that character scanline */
592656      gfx = state->m_p_chargen[(chr<<4) | ra ] ^ inv;
r15604r15605
648712   MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(bigbord2_floppy_interface)
649713   MCFG_MC6845_ADD("crtc", MC6845, XTAL_16MHz / 8, bigbord2_crtc)
650714   MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
715
716   /* sound hardware */
717   MCFG_SPEAKER_STANDARD_MONO("mono")
718   MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0)
719   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
651720MACHINE_CONFIG_END
652721
653722
r15604r15605
655724
656725
657726ROM_START( bigbord2 )
658   ROM_REGION( 0x1000, Z80_TAG, 0 )
727   ROM_REGION( 0x18000, Z80_TAG, 0 )
659728   ROM_LOAD( "bigbrdii.bin", 0x0000, 0x1000, CRC(c588189e) SHA1(4133903171ee8b9fcf12cc72de843af782b4a645) )
660729
661730   // internal to 8002 chip (undumped) we will use one from 'vta2000' for now
r15604r15605
664733ROM_END
665734/* System Drivers */
666735
667/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT       INIT    COMPANY                      FULLNAME        FLAGS */
668COMP( 1982, bigbord2,   bigboard,   0,      bigbord2,   bigbord2,   0,   "Digital Research Computers", "Big Board II", GAME_NOT_WORKING | GAME_NO_SOUND)
736/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT       INIT        COMPANY                      FULLNAME        FLAGS */
737COMP( 1982, bigbord2,   bigboard,   0,      bigbord2,   bigbord2,   bigbord2, "Digital Research Computers", "Big Board II", GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team