Previous 15994 Revisions Next

r15625 Thursday 19th July, 2012 at 02:41:47 UTC by Angelo Salese
Preliminary LED addition for Mega CD
[src/mame]mame.mak
[src/mame/layout]megacd.lay*
[src/mame/machine]megacd.c megadriv.c
[src/mess]mess.mak

src/mame/machine/megadriv.c
r15624r15625
4545#include "includes/megadriv.h"
4646#include "machine/nvram.h"
4747#include "cpu/ssp1601/ssp1601.h"
48#include "megacd.lh"
4849
4950
5051
r15624r15625
12581259
12591260   MCFG_TIMER_ADD("sw_timer", NULL) //stopwatch timer
12601261
1262   MCFG_DEFAULT_LAYOUT( layout_megacd )
1263
12611264   MCFG_NVRAM_ADD_0FILL("backupram")
12621265
12631266   MCFG_SOUND_ADD( "cdda", CDDA, 0 )
r15624r15625
12701273
12711274   MCFG_TIMER_ADD("scd_dma_timer", scd_dma_timer_callback)
12721275
1273
12741276   MCFG_QUANTUM_PERFECT_CPU("segacd_68k") // perfect sync to the fastest cpu
12751277MACHINE_CONFIG_END
12761278
r15624r15625
13051307   MCFG_NVRAM_ADD_0FILL("backupram")
13061308   MCFG_TIMER_ADD("scd_dma_timer", scd_dma_timer_callback)
13071309
1310   MCFG_DEFAULT_LAYOUT( layout_megacd )
1311
13081312   MCFG_SOUND_ADD( "cdda", CDDA, 0 )
13091313   MCFG_SOUND_ROUTE( 0, "lspeaker", 0.50 )
13101314   MCFG_SOUND_ROUTE( 1, "rspeaker", 0.50 )
src/mame/machine/megacd.c
r15624r15625
24152415      segacd_redled = (data >> 8)&1;
24162416      segacd_greenled = (data >> 9)&1;
24172417
2418      output_set_value("red_led",segacd_redled ^ 1);
2419      output_set_value("green_led",segacd_greenled ^ 1);
2420
24182421      //popmessage("%02x %02x",segacd_greenled,segacd_redled);
24192422   }
2420
24212423}
24222424
24232425
src/mame/mame.mak
r15624r15625
22122212
22132213$(DRIVERS)/peyper.o:    $(LAYOUT)/peyper.lh
22142214
2215$(MACHINE)/megadriv.o   $(LAYOUT)/megacd.lh
2216
2217
22152218#-------------------------------------------------
22162219# misc dependencies
22172220#-------------------------------------------------
src/mame/layout/megacd.lay
r0r15625
1<!-- Basic display of CD-ROM drive LEDs for the Sega MegaCD -->
2
3<mamelayout version="2">
4
5   <element name="red_led">
6      <rect>
7         <color red="1.0" green="0.0" blue="0.0" />
8      </rect>
9   </element>
10   <element name="green_led">
11      <rect>
12         <color red="0.0" green="1.0" blue="0.0" />
13      </rect>
14   </element>
15
16   <view name="Simple Artwork">
17      <bounds left="0" right="400" top="0" bottom="330" />
18      <screen index="0">
19         <bounds left="0" right="400" top="0" bottom="300" />
20      </screen>
21
22      <bezel name="red_led" element="red_led">
23         <bounds x="8" y="312" width="17" height="9" />
24      </bezel>
25
26      <bezel name="green_led" element="green_led">
27         <bounds x="31" y="312" width="17" height="9" />
28      </bezel>
29   </view>
30
31</mamelayout>
No newline at end of file
src/mess/mess.mak
r15624r15625
21152115$(MESS_DRIVERS)/lynx.o:      $(MESS_LAYOUT)/lynx.lh
21162116$(MESS_DRIVERS)/lx800.o:   $(MESS_LAYOUT)/lx800.lh
21172117$(MESS_DRIVERS)/mac.o:      $(MESS_LAYOUT)/mac.lh
2118$(MESS_DRIVERS)/megadriv.o:   $(MAME_LAYOUT)/megacd.lh
21182119$(MESS_DRIVERS)/mekd2.o:   $(MESS_LAYOUT)/mekd2.lh
21192120$(MESS_DRIVERS)/mephisto.o:   $(MESS_LAYOUT)/mephisto.lh
21202121$(MESS_DRIVERS)/mikrolab.o:   $(MESS_LAYOUT)/mikrolab.lh

Previous 15994 Revisions Next


© 1998-2018 The MESS Team