commodore/kim1.cpp: Added view with screen (won't be viable without framebuffer card) and clickable buttons.

This commit is contained in:
Vas Crabb 2023-12-21 23:13:15 +11:00
parent 3276b366a5
commit 0b7dbf53e0
3 changed files with 382 additions and 4 deletions

View File

@ -9,8 +9,9 @@
#include "emu.h"
#include "cards.h"
#include "k1008_vismem.h"
#include "k1016_16k.h"
#include "k1008_vismem.h"
void kim1_cards(device_slot_interface &device)
{

View File

@ -65,10 +65,9 @@ TODO:
#include "emu.h"
#include "bus/kim1/kim1bus.h"
#include "bus/kim1/cards.h"
#include "bus/kim1/kim1bus.h"
#include "cpu/m6502/m6502.h"
#include "formats/kim1_cas.h"
#include "imagedev/cassette.h"
#include "machine/mos6530.h"
#include "machine/timer.h"
@ -77,6 +76,8 @@ TODO:
#include "softlist_dev.h"
#include "speaker.h"
#include "formats/kim1_cas.h"
#include "kim1.lh"

View File

@ -10,7 +10,276 @@ license:CC0-1.0
</led7seg>
</element>
<view name="Default Layout">
<repeat count="10">
<param name="n" start="0" increment="1" />
<element name="key~n~">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="~n~">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
</repeat>
<element name="keya">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="A">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyb">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="B">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyc">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="C">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyd">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="D">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keye">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="E">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyf">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="F">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyad">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="AD">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyda">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="DA">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keypc">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="PC">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyplus">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="+">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keygo">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="GO">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyst">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="ST">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<element name="keyrs">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.25" green="0.25" blue="0.25" />
</rect>
<rect state="0">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.4" green="0.4" blue="0.4" />
</rect>
<rect state="1">
<bounds left="0.05" top="0.05" right="0.95" bottom="0.95" />
<color red="0.1" green="0.1" blue="0.1" />
</rect>
<text string="RS">
<bounds left="0.1" top="0.15" right="0.9" bottom="0.85" />
<color red="1" green="1" blue="1" />
</text>
</element>
<group name="leds">
<!-- LED address display -->
<element name="digit0" ref="digit">
<bounds x="0" y="0" width="18" height="24" />
@ -32,5 +301,112 @@ license:CC0-1.0
<element name="digit5" ref="digit">
<bounds x="96" y="0" width="18" height="24" />
</element>
</group>
<group name="keypad">
<element ref="keygo" inputtag="ROW2" inputmask="0x02">
<bounds x="0" y="0" width="4" height="4" />
</element>
<element ref="keyst" inputtag="SPECIAL" inputmask="0x01">
<bounds x="5" y="0" width="4" height="4" />
</element>
<element ref="keyrs" inputtag="SPECIAL" inputmask="0x02">
<bounds x="10" y="0" width="4" height="4" />
</element>
<element ref="keyad" inputtag="ROW2" inputmask="0x10">
<bounds x="0" y="5" width="4" height="4" />
</element>
<element ref="keyda" inputtag="ROW2" inputmask="0x08">
<bounds x="5" y="5" width="4" height="4" />
</element>
<element ref="keypc" inputtag="ROW2" inputmask="0x01">
<bounds x="10" y="5" width="4" height="4" />
</element>
<element ref="keyplus" inputtag="ROW2" inputmask="0x04">
<bounds x="15" y="5" width="4" height="4" />
</element>
<element ref="keyc" inputtag="ROW1" inputmask="0x02">
<bounds x="0" y="10" width="4" height="4" />
</element>
<element ref="keyd" inputtag="ROW1" inputmask="0x01">
<bounds x="5" y="10" width="4" height="4" />
</element>
<element ref="keye" inputtag="ROW2" inputmask="0x40">
<bounds x="10" y="10" width="4" height="4" />
</element>
<element ref="keyf" inputtag="ROW2" inputmask="0x20">
<bounds x="15" y="10" width="4" height="4" />
</element>
<element ref="key8" inputtag="ROW1" inputmask="0x20">
<bounds x="0" y="15" width="4" height="4" />
</element>
<element ref="key9" inputtag="ROW1" inputmask="0x10">
<bounds x="5" y="15" width="4" height="4" />
</element>
<element ref="keya" inputtag="ROW1" inputmask="0x08">
<bounds x="10" y="15" width="4" height="4" />
</element>
<element ref="keyb" inputtag="ROW1" inputmask="0x04">
<bounds x="15" y="15" width="4" height="4" />
</element>
<element ref="key4" inputtag="ROW0" inputmask="0x04">
<bounds x="0" y="20" width="4" height="4" />
</element>
<element ref="key5" inputtag="ROW0" inputmask="0x02">
<bounds x="5" y="20" width="4" height="4" />
</element>
<element ref="key6" inputtag="ROW0" inputmask="0x01">
<bounds x="10" y="20" width="4" height="4" />
</element>
<element ref="key7" inputtag="ROW1" inputmask="0x40">
<bounds x="15" y="20" width="4" height="4" />
</element>
<element ref="key0" inputtag="ROW0" inputmask="0x40">
<bounds x="0" y="25" width="4" height="4" />
</element>
<element ref="key1" inputtag="ROW0" inputmask="0x20">
<bounds x="5" y="25" width="4" height="4" />
</element>
<element ref="key2" inputtag="ROW0" inputmask="0x10">
<bounds x="10" y="25" width="4" height="4" />
</element>
<element ref="key3" inputtag="ROW0" inputmask="0x08">
<bounds x="15" y="25" width="4" height="4" />
</element>
</group>
<view name="Keypad and LEDs">
<group ref="leds">
<bounds x="0" y="0" width="114" height="25" />
</group>
<group ref="keypad">
<bounds x="0" y="40" width="114" height="174" />
</group>
</view>
<view name="LEDs">
<group ref="leds">
<bounds x="0" y="0" width="114" height="25" />
</group>
</view>
<view name="Keypad, LEDs and Screen">
<group ref="leds">
<bounds x="0" y="0" width="114" height="25" />
</group>
<group ref="keypad">
<bounds x="0" y="39" width="114" height="174" />
</group>
<screen index="0">
<bounds x="128" y="0" width="284" height="213" />
</screen>
</view>
</mamelayout>