Previous 199869 Revisions Next

r29632 Monday 14th April, 2014 at 11:31:02 UTC by Robbbert
(MESS) amust : added sound and more notes.
[src/mess/drivers]amust.c

trunk/src/mess/drivers/amust.c
r29631r29632
3636Having the PIT on ports 14-17 seems to make sense. It sets counters 1 and 2
3737to mode 3, binary, initial count = 0x80. Counter 0 not used?
3838
39
3940Floppy Parameters:
41------------------
4042Double Density
4143Two Side
424480 track
r29631r29632
4850Skew 1,3,5,2,4
4951
5052
53Stuff that doesn't make sense:
54------------------------------
551. To access the screen, it waits for IRQ presumably from sync pulse. It sets INT
56mode 0 which means a page-zero jump, but doesn't write anything to the zero-page ram.
57That's why I added a RETI at 0008 and set the vector to there. A bit later it writes
58a jump at 0000. Then it sets the interrupting device to the fdc (not sure how yet),
59then proceeds to overwrite all of page-zero with the disk contents. This of course
60kills the jump it just wrote, and my RETI. So it runs into the weeds at high speed.
61What should happen is after loading the boot sector succesfully it will jump to 0000,
62otherwise it will write BOOT NG to the screen and you're in the monitor. The bios
63contains no RETI instructions.
642. At F824 it copies itself to the same address which is presumably shadow ram. But
65it never switches to it. The ram is physically in the machine.
66
67
5168Monitor Commands:
69-----------------
5270B = Boot from floppy
5371(YES! Most useless monitor ever)
5472
r29631r29632
5775- Everything
5876- Need software
5977- If booting straight to CP/M, the load message should be in the middle of the screen.
60- Beeper is a low pulse on bit 0 of port 0b
6178
79
6280****************************************************************************/
6381
6482#include "emu.h"
r29631r29632
6987#include "machine/pit8253.h"
7088#include "machine/i8255.h"
7189#include "machine/i8251.h"
90#include "sound/beep.h"
7291
7392
7493class amust_state : public driver_device
7594{
7695public:
96   enum
97   {
98      TIMER_BEEP_OFF
99   };
100
77101   amust_state(const machine_config &mconfig, device_type type, const char *tag)
78102      : driver_device(mconfig, type, tag)
79103      , m_palette(*this, "palette")
80104      , m_maincpu(*this, "maincpu")
105      , m_beep(*this, "beeper")
81106      , m_fdc (*this, "fdc")
82107      , m_floppy0(*this, "fdc:0")
83108      , m_floppy1(*this, "fdc:1")
r29631r29632
109134   UINT8 m_port08;
110135   UINT8 m_port0a;
111136   UINT8 m_term_data;
137   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
112138   required_device<cpu_device> m_maincpu;
139   required_device<beep_device> m_beep;
113140   required_device<upd765a_device> m_fdc;
114141   required_device<floppy_connector> m_floppy0;
115142   required_device<floppy_connector> m_floppy1;
116143};
117144
145void amust_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
146{
147   switch (id)
148   {
149   case TIMER_BEEP_OFF:
150      m_beep->set_state(0);
151      break;
152   default:
153      assert_always(FALSE, "Unknown id in amust_state::device_timer");
154   }
155}
156
118157//WRITE8_MEMBER( amust_state::port00_w )
119158//{
120159//  membank("bankr0")->set_entry(BIT(data, 6));
r29631r29632
196235   return m_port06;
197236}
198237
238// BIT 5 low while writing to screen
199239WRITE8_MEMBER( amust_state::port06_w )
200240{
201241   m_port06 = data;
r29631r29632
216256   return m_port08;
217257}
218258
259// lower 8 bits of video address
219260WRITE8_MEMBER( amust_state::port08_w )
220261{
221262   m_port08 = data;
222263}
223264
224// bit 4: H = go to monitor; L = boot from disk
265/*
266d0 - something to do with type of disk
267d1 -
268d2 -
269d3 -
270d4 - H = go to monitor; L = boot from disk
271d5 - status of disk-related; loops till NZ
272d6 -
273d7 -
274*/
225275READ8_MEMBER( amust_state::port09_r )
226276{
277   printf("%s\n",machine().describe_context());
227278   return 0xff;
228279}
229280
r29631r29632
232283   return m_port0a;
233284}
234285
286/* Bits 7,6,5,3 something to do
287with selecting which device causes interrupt?
28850, 58 = video sync
28970 disk
290D0 ?
291Bit 4 low = beeper.
292Lower 3 bits = upper part of video address */
235293WRITE8_MEMBER( amust_state::port0a_w )
236294{
237295   m_port0a = data;
296
297   if (!BIT(data, 4))
298   {
299      m_beep->set_state(1);
300      timer_set(attotime::from_msec(150), TIMER_BEEP_OFF);
301   }
238302}
239303
240304static I8255_INTERFACE( ppi2_intf )
r29631r29632
327391   m_p_videoram = memregion("videoram")->base();
328392   membank("bankr0")->set_entry(0); // point at rom
329393   membank("bankw0")->set_entry(0); // always write to ram
394   m_beep->set_frequency(800);
330395   address_space &space = m_maincpu->space(AS_PROGRAM);
331   space.write_byte(8, 0xc9);
396   space.write_byte(8, 0xed);
397   space.write_byte(9, 0x4d);
332398   m_port04 = 0;
333399   m_port06 = 0;
334400   m_port08 = 0;
r29631r29632
363429   MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
364430   MCFG_GFXDECODE_ADD("gfxdecode", "palette", amust)
365431
432   /* sound hardware */
433   MCFG_SPEAKER_STANDARD_MONO("mono")
434   MCFG_SOUND_ADD("beeper", BEEP, 0)
435   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
436
366437   /* Devices */
367438   MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_14_31818MHz / 8, amust_crtc)
368439   MCFG_DEVICE_ADD("keybd", GENERIC_KEYBOARD, 0)
r29631r29632
408479/* Driver */
409480
410481/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    CLASS          INIT     COMPANY       FULLNAME       FLAGS */
411COMP( 1983, amust,  0,      0,       amust,     amust,   amust_state,   amust,  "Amust", "Amust Executive 816", GAME_IS_SKELETON)
482COMP( 1983, amust,  0,      0,       amust,     amust,   amust_state,   amust,  "Amust", "Amust Executive 816", GAME_NOT_WORKING )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team