trunk/src/mess/layout/svmu.lay
| r0 | r19132 | |
| 1 | <?xml version="1.0"?> |
| 2 | <mamelayout version="2"> |
| 3 | <element name="file" defstate="0"> |
| 4 | <text string="FILE" state="1"> |
| 5 | <color red="0" green="0" blue="0" /> |
| 6 | </text> |
| 7 | </element> |
| 8 | <element name="game" defstate="0"> |
| 9 | <text string="GAME" state="1"> |
| 10 | <color red="0" green="0" blue="0" /> |
| 11 | </text> |
| 12 | </element> |
| 13 | <element name="clock" defstate="0"> |
| 14 | <text string="CLOCK" state="1"> |
| 15 | <color red="0" green="0" blue="0" /> |
| 16 | </text> |
| 17 | </element> |
| 18 | <element name="flash" defstate="0"> |
| 19 | <text string="FLASH" state="1"> |
| 20 | <color red="0" green="0" blue="0" /> |
| 21 | </text> |
| 22 | </element> |
| 23 | <element name="background"> |
| 24 | <rect> |
| 25 | <color red="0.54" green="0.57" blue="0.58" /> |
| 26 | </rect> |
| 27 | </element> |
| 28 | |
| 29 | <view name="Default Layout"> |
| 30 | <bezel element="background"> |
| 31 | <bounds x="0" y="~scr0height~" width="~scr0width~" height="30" /> |
| 32 | </bezel> |
| 33 | <bezel name="file_icon" element="file"> |
| 34 | <bounds x="0" y="~scr0height~" width="80" height="30" /> |
| 35 | </bezel> |
| 36 | <bezel name="game_icon" element="game"> |
| 37 | <bounds x="85" y="~scr0height~" width="80" height="30" /> |
| 38 | </bezel> |
| 39 | <bezel name="clock_icon" element="clock"> |
| 40 | <bounds x="170" y="~scr0height~" width="100" height="30" /> |
| 41 | </bezel> |
| 42 | <bezel name="flash_icon" element="flash"> |
| 43 | <bounds x="275" y="~scr0height~" width="100" height="30" /> |
| 44 | </bezel> |
| 45 | |
| 46 | <screen index="0"> |
| 47 | <bounds left="0" top="0" right="~scr0width~" bottom="~scr0height~" /> |
| 48 | </screen> |
| 49 | </view> |
| 50 | <view name="LCD Only"> |
| 51 | <screen index="0"> |
| 52 | <bounds left="0" top="0" right="~scr0width~" bottom="~scr0height~" /> |
| 53 | </screen> |
| 54 | </view> |
| 55 | </mamelayout> |
trunk/src/mess/drivers/svmu.c
| r19131 | r19132 | |
| 6 | 6 | |
| 7 | 7 | TODO: |
| 8 | 8 | - add more bios versions |
| 9 | | - layout for LCD symbols |
| 10 | 9 | - serial |
| 11 | 10 | |
| 12 | 11 | ****************************************************************************/ |
| r19131 | r19132 | |
| 16 | 15 | #include "imagedev/snapquik.h" |
| 17 | 16 | #include "machine/intelfsh.h" |
| 18 | 17 | #include "sound/speaker.h" |
| 19 | | #include "rendlay.h" |
| 18 | #include "svmu.lh" |
| 20 | 19 | |
| 21 | 20 | #define PIXEL_SIZE 7 |
| 22 | 21 | #define PIXEL_DISTANCE 1 |
| r19131 | r19132 | |
| 39 | 38 | virtual void machine_reset(); |
| 40 | 39 | |
| 41 | 40 | DECLARE_WRITE8_MEMBER(page_w); |
| 42 | | DECLARE_READ8_MEMBER(flash_r); |
| 43 | | DECLARE_WRITE8_MEMBER(flash_w); |
| 44 | 41 | DECLARE_READ8_MEMBER(prog_r); |
| 45 | 42 | DECLARE_WRITE8_MEMBER(prog_w); |
| 46 | 43 | DECLARE_READ8_MEMBER(p1_r); |
| r19131 | r19132 | |
| 58 | 55 | m_page = data & 0x03; |
| 59 | 56 | } |
| 60 | 57 | |
| 61 | | READ8_MEMBER(svmu_state::flash_r) |
| 62 | | { |
| 63 | | return m_flash->read(offset); |
| 64 | | } |
| 65 | | |
| 66 | | WRITE8_MEMBER(svmu_state::flash_w) |
| 67 | | { |
| 68 | | m_flash->write(offset, data); |
| 69 | | } |
| 70 | | |
| 71 | 58 | READ8_MEMBER(svmu_state::prog_r) |
| 72 | 59 | { |
| 73 | 60 | if (m_page == 1) |
| r19131 | r19132 | |
| 177 | 164 | for (int b=0; b<8; b++) |
| 178 | 165 | bitmap.plot_box((x*8 + b) * (PIXEL_SIZE + PIXEL_DISTANCE), y * (PIXEL_SIZE + PIXEL_DISTANCE), PIXEL_SIZE, PIXEL_SIZE, BIT(gfx,7-b)); |
| 179 | 166 | } |
| 180 | | |
| 181 | | popmessage("%c %c %c %c\n", BIT(vram[0xc1],6) ? 'F' : ' ', // File icon |
| 182 | | BIT(vram[0xc2],4) ? 'G' : ' ', // Game icon |
| 183 | | BIT(vram[0xc3],2) ? 'C' : ' ', // Clock icon |
| 184 | | BIT(vram[0xc4],0) ? 'A' : ' '); // Flash icon |
| 185 | 167 | } |
| 186 | 168 | else |
| 187 | 169 | { |
| r19131 | r19132 | |
| 330 | 312 | MCFG_SCREEN_SIZE(48 * (PIXEL_SIZE + PIXEL_DISTANCE), 32 * (PIXEL_SIZE + PIXEL_DISTANCE)) |
| 331 | 313 | MCFG_SCREEN_VISIBLE_AREA(0, 48*(PIXEL_SIZE + PIXEL_DISTANCE) - 1, 0, 32*(PIXEL_SIZE + PIXEL_DISTANCE) - 1) |
| 332 | 314 | MCFG_SCREEN_UPDATE_DEVICE("maincpu", lc8670_cpu_device, screen_update) |
| 333 | | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 315 | MCFG_DEFAULT_LAYOUT(layout_svmu) |
| 334 | 316 | MCFG_PALETTE_LENGTH(2) |
| 335 | 317 | |
| 336 | 318 | /* sound hardware */ |