Previous 199869 Revisions Next

r19085 Wednesday 21st November, 2012 at 03:02:45 UTC by Angelo Salese
LN realized that MPU is actually upd1771, attempting to hook it up without luck
[src/mess/audio]upd1771.c upd1771.h
[src/mess/drivers]apc.c

trunk/src/mess/drivers/apc.c
r19084r19085
5353
5454#include "emu.h"
5555#include "cpu/i86/i86.h"
56#include "audio/upd1771.h"
5657#include "machine/pic8259.h"
5758#include "machine/pit8253.h"
5859#include "machine/am9517a.h"
r19084r19085
107108
108109   DECLARE_READ8_MEMBER(apc_port_28_r);
109110   DECLARE_WRITE8_MEMBER(apc_port_28_w);
110   DECLARE_READ8_MEMBER(apc_port_60_r);
111   DECLARE_WRITE8_MEMBER(apc_port_60_w);
112111   DECLARE_READ8_MEMBER(apc_gdc_r);
113112   DECLARE_WRITE8_MEMBER(apc_gdc_w);
114113   DECLARE_READ8_MEMBER(apc_kbd_r);
r19084r19085
327326}
328327
329328
330READ8_MEMBER(apc_state::apc_port_60_r)
331{
332   UINT8 res;
333
334   if(offset & 1)
335   {
336      printf("Read undefined port %02x\n",offset+0x60);
337      res = 0xff;
338   }
339   else
340   {
341      //printf("Read melody port %02x\n",offset+0x60);
342      res = 0x80;
343   }
344
345   return res;
346}
347
348WRITE8_MEMBER(apc_state::apc_port_60_w)
349{
350   if(offset & 1)
351   {
352      printf("Write undefined port %02x\n",offset+0x60);
353   }
354   else
355   {
356      printf("Write melody port %02x %02x\n",offset+0x60,data);
357   }
358}
359
360329READ8_MEMBER(apc_state::apc_gdc_r)
361330{
362331   UINT8 res;
r19084r19085
491460   AM_RANGE(0x58, 0x59) AM_READWRITE8(apc_rtc_r, apc_rtc_w, 0x00ff)
492461//  0x5a  APU data (Arithmetic Processing Unit!)
493462//  0x5e  APU status/command
494   AM_RANGE(0x60, 0x67) AM_READWRITE8(apc_port_60_r, apc_port_60_w, 0xffff)
495//  0x60 Melody Processing Unit
463   AM_RANGE(0x60, 0x61) AM_DEVREADWRITE8_LEGACY("upd1771c", upd1771_r, upd1771_w, 0x00ff )
496464//  AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W))
497465//  AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff)
498466//   0x92, 0x9a, 0xa2, 0xaa is for a Hard Disk (unknown type)
r19084r19085
969937
970938READ8_MEMBER(apc_state::fdc_r)
971939{
972//  printf("2dd DACK R\n");
973
974940   return m_fdc->dma_r();
975941}
976942
977943WRITE8_MEMBER(apc_state::fdc_w)
978944{
979   //   printf("2dd DACK W\n");
980945   m_fdc->dma_w(data);
981946}
982947
r19084r19085
1018983      palette_set_color_rgb(machine(), i, pal1bit(0), pal1bit(0), pal1bit(0));
1019984}
1020985
986static const upd1771_interface upd1771c_config = { DEVCB_NULL };
987
1021988static MACHINE_CONFIG_START( apc, apc_state )
1022989
1023990   /* basic machine hardware */
r19084r19085
10551022
10561023   /* sound hardware */
10571024   MCFG_SPEAKER_STANDARD_MONO("mono")
1058//  MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/4)
1059//  MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
1025   MCFG_SOUND_ADD( "upd1771c", UPD1771C, MAIN_CLOCK )
1026   MCFG_SOUND_CONFIG( upd1771c_config )
1027   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
10601028MACHINE_CONFIG_END
10611029
10621030
trunk/src/mess/audio/upd1771.c
r19084r19085
162162}
163163
164164
165READ8_DEVICE_HANDLER( upd1771_r )
166{
167   return 0x80; // TODO
168}
169
165170/*
166171*************TONE*****************
167172Tone consist of a wavetable playback mechanism.
r19084r19085
190195   of bit cropping/rounding.
191196*/
192197
198
193199/*
194200*************NOISE*****************
195201Noise consists on 4 different components
trunk/src/mess/audio/upd1771.h
r19084r19085
5454    PROTOTYPES
5555***************************************************************************/
5656
57DECLARE_READ8_DEVICE_HANDLER( upd1771_r );
5758DECLARE_WRITE8_DEVICE_HANDLER( upd1771_w );
5859WRITE_LINE_DEVICE_HANDLER( upd1771_pcm_w );
5960

Previous 199869 Revisions Next


© 1997-2024 The MAME Team