Previous 15994 Revisions Next

r8665 Saturday 31st July, 2010 at 13:18:21 UTC by Angelo Salese
[MULTI8][BASIC MASTER JR]: Added beeper for both drivers
[src/mess/drivers]bmjr.c multi8.c

src/mess/drivers/multi8.c
r8664r8665
88   - dunno how to trigger the text color mode in BASIC, I just modify
99     $f0b1 to 1 for now
1010   - bitmap B/W mode is untested
11   - Beeper keeps ringing, is it due of an HW failure?
1211
1312****************************************************************************/
1413
r8664r8665
517516
518517static WRITE8_DEVICE_HANDLER( ym2203_porta_w )
519518{
520   beep_set_state(device->machine->device("beeper"),data & 0x08);
519   beep_set_state(device->machine->device("beeper"),!(data & 0x08));
521520}
522521
523522static const ym2203_interface ym2203_config =
r8664r8665
538537
539538static MACHINE_RESET(multi8)
540539{
541   beep_set_frequency(machine->device("beeper"),300); //guesswork
540   beep_set_frequency(machine->device("beeper"),1200); //guesswork
542541   beep_set_state(machine->device("beeper"),0);
543542   mcu_init = 0;
544543}
r8664r8665
577576   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
578577
579578   MDRV_SOUND_ADD("beeper", BEEP, 0)
580   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.00) //FIXME: temporarly silenced
579   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
581580MACHINE_DRIVER_END
582581
583582/* ROM definition */
src/mess/drivers/bmjr.c
r8664r8665
88
99#include "emu.h"
1010#include "cpu/m6800/m6800.h"
11#include "sound/beep.h"
1112
1213static UINT8 *wram;
14static UINT8 tape_switch;
1315
1416static VIDEO_START( bmjr )
1517{
r8664r8665
6466static WRITE8_HANDLER( key_w )
6567{
6668   key_mux = data & 0xf;
69
70   if(data & 0xf0)
71      printf("%02x",data & 0xf0);
6772}
6873
74static READ8_HANDLER( ff_r )
75{
76   return 0xff;
77}
78
79static READ8_HANDLER( tape_r )
80{
81   return 0xff; //TODO
82}
83
84static WRITE8_HANDLER( tape_w )
85{
86   if(!tape_switch)
87   {
88      beep_set_state(space->machine->device("beeper"),!(data & 0x80));
89   }
90   else
91   {
92      // ...
93   }
94}
95
6996static ADDRESS_MAP_START(bmjr_mem, ADDRESS_SPACE_PROGRAM, 8)
70//   ADDRESS_MAP_UNMAP_HIGH
97   ADDRESS_MAP_UNMAP_HIGH
7198   //0x0100, 0x03ff basic vram
7299   //0x0900, 0x20ff vram, modes 0x40 / 0xc0
73100   //0x2100, 0x38ff vram, modes 0x44 / 0xcc
r8664r8665
79106//   AM_RANGE(0xee00, 0xee00) R stop tape
80107//   AM_RANGE(0xee20, 0xee20) R start tape
81108//   AM_RANGE(0xee40, 0xee40) W Picture reverse (?)
82//   AM_RANGE(0xee80, 0xee80) RW tape input / output
109   AM_RANGE(0xee80, 0xee80) AM_READWRITE(tape_r,tape_w)//RW tape input / output
83110   AM_RANGE(0xeec0, 0xeec0) AM_READWRITE(key_r,key_w)//RW keyboard
84//   AM_RANGE(0xef00, 0xef00) R timer
111   AM_RANGE(0xef00, 0xef00) AM_READ(ff_r) //R timer
85112//   AM_RANGE(0xef40, 0xef40) R unknown
86113//   AM_RANGE(0xef80, 0xef80) R unknown
87114//   AM_RANGE(0xefe0, 0xefe0) W screen mode
r8664r8665
207234   PORT_BIT(0xf0,IP_ACTIVE_LOW,IPT_UNUSED )
208235INPUT_PORTS_END
209236
210
211static MACHINE_RESET(bmjr)
212{
213}
214
215237static const gfx_layout bmjr_charlayout =
216238{
217239   8, 8,
r8664r8665
235257      palette_set_color_rgb(machine, i, pal1bit(i >> 1),pal1bit(i >> 2),pal1bit(i >> 0));
236258}
237259
260
261static MACHINE_START(bmjr)
262{
263   beep_set_frequency(machine->device("beeper"),1200); //guesswork
264   beep_set_state(machine->device("beeper"),0);
265}
266
267static MACHINE_RESET(bmjr)
268{
269   tape_switch = 0;
270}
271
238272static MACHINE_DRIVER_START( bmjr )
239273    /* basic machine hardware */
240274    MDRV_CPU_ADD("maincpu",M6800, XTAL_4MHz/4) //unknown clock / divider
241275    MDRV_CPU_PROGRAM_MAP(bmjr_mem)
276   MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
242277
278   MDRV_MACHINE_START(bmjr)
243279    MDRV_MACHINE_RESET(bmjr)
244280
245281    /* video hardware */
r8664r8665
256292
257293    MDRV_VIDEO_START(bmjr)
258294    MDRV_VIDEO_UPDATE(bmjr)
295
296   MDRV_SPEAKER_STANDARD_MONO("mono")
297
298   MDRV_SOUND_ADD("beeper", BEEP, 0)
299   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
259300MACHINE_DRIVER_END
260301
261302/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team