Skip to content

Commit 2d6b2f4

Browse files
committed
hh_sm510: add preset for triple screen games
1 parent dcdde1f commit 2d6b2f4

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

src/mame/handheld/hh_sm510.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ The MCUs used were not imported from Sharp, but cloned by USSR, renamed to
155155
#include "hh_sm510_single.lh"
156156
#include "hh_sm510_dualv.lh"
157157
#include "hh_sm510_dualh.lh"
158+
#include "hh_sm510_tripleh.lh"
158159

159160
//#include "hh_sm510_test.lh" // common test-layout - use external artwork
160161
#include "hh_sm500_test.lh" // "
@@ -494,6 +495,17 @@ void hh_sm510_state::sm510_dualh(machine_config &config, u16 leftwidth, u16 left
494495
config.set_default_layout(layout_hh_sm510_dualh);
495496
}
496497

498+
void hh_sm510_state::sm510_tripleh(machine_config &config, u16 leftwidth, u16 leftheight, u16 middlewidth, u16 middleheight, u16 rightwidth, u16 rightheight)
499+
{
500+
mcfg_cpu_sm510(config);
501+
mcfg_sound_r1(config);
502+
mcfg_svg_screen(config, leftwidth, leftheight, "screen_left");
503+
mcfg_svg_screen(config, middlewidth, middleheight, "screen_middle");
504+
mcfg_svg_screen(config, rightwidth, rightheight, "screen_right");
505+
506+
config.set_default_layout(layout_hh_sm510_tripleh);
507+
}
508+
497509
void hh_sm510_state::dualv_common(machine_config &config, u16 topwidth, u16 topheight, u16 botwidth, u16 botheight)
498510
{
499511
mcfg_sound_r1(config);

src/mame/handheld/hh_sm510.h

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class hh_sm510_state : public driver_device
103103
void sm530_common(machine_config &config, u16 width, u16 height);
104104

105105
void sm510_dualh(machine_config &config, u16 leftwidth, u16 leftheight, u16 rightwidth, u16 rightheight);
106+
[[maybe_unused]] void sm510_tripleh(machine_config &config, u16 leftwidth, u16 leftheight, u16 middlewidth, u16 middleheight, u16 rightwidth, u16 rightheight);
106107
void dualv_common(machine_config &config, u16 topwidth, u16 topheight, u16 botwidth, u16 botheight);
107108
void sm510_dualv(machine_config &config, u16 topwidth, u16 topheight, u16 botwidth, u16 botheight);
108109
void sm511_dualv(machine_config &config, u16 topwidth, u16 topheight, u16 botwidth, u16 botheight);

src/mame/layout/hh_sm510_tripleh.lay

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
license:CC0-1.0
4+
authors:hap
5+
-->
6+
<mamelayout version="2">
7+
8+
<element name="lcdm"><rect><color red="0.7" green="0.71" blue="0.72" /></rect></element>
9+
10+
<view name="LCD 0 Pixel Aspect (~scr0nativexaspect~:~scr0nativeyaspect~)">
11+
<screen index="0"><bounds left="0" top="0" right="~scr0width~" bottom="~scr0height~" /></screen>
12+
<element ref="lcdm" blend="multiply"><bounds left="0" top="0" right="~scr0width~" bottom="~scr0height~" /></element>
13+
</view>
14+
15+
<view name="LCD 1 Pixel Aspect (~scr1nativexaspect~:~scr1nativeyaspect~)">
16+
<screen index="1"><bounds left="0" top="0" right="~scr1width~" bottom="~scr1height~" /></screen>
17+
<element ref="lcdm" blend="multiply"><bounds left="0" top="0" right="~scr1width~" bottom="~scr1height~" /></element>
18+
</view>
19+
20+
<view name="LCD 2 Pixel Aspect (~scr2nativexaspect~:~scr2nativeyaspect~)">
21+
<screen index="1"><bounds left="0" top="0" right="~scr2width~" bottom="~scr2height~" /></screen>
22+
<element ref="lcdm" blend="multiply"><bounds left="0" top="0" right="~scr2width~" bottom="~scr2height~" /></element>
23+
</view>
24+
25+
<!-- can't do a view with gaps -->
26+
<view name="LCD Triple Side-by-Side (Gapless)">
27+
<screen index="0"><bounds x="-~scr0width~" y="0" width="~scr0width~" height="~scr0height~" /></screen>
28+
<element ref="lcdm" blend="multiply"><bounds x="-~scr0width~" y="0" width="~scr0width~" height="~scr0height~" /></element>
29+
<screen index="1"><bounds x="0" y="0" width="~scr1width~" height="~scr1height~" /></screen>
30+
<element ref="lcdm" blend="multiply"><bounds x="0" y="0" width="~scr1width~" height="~scr1height~" /></element>
31+
<screen index="2"><bounds x="~scr1width~" y="0" width="~scr2width~" height="~scr2height~" /></screen>
32+
<element ref="lcdm" blend="multiply"><bounds x="~scr1width~" y="0" width="~scr2width~" height="~scr2height~" /></element>
33+
</view>
34+
35+
</mamelayout>

0 commit comments

Comments
 (0)