From 26b76927dcb981dfcbafbb991cd4d41cd567d595 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Wed, 13 Aug 2025 16:17:39 -0300 Subject: [PATCH 01/17] [patinhofeio layout] change color and dimensions of fontpanel background --- src/mame/layout/patinho.lay | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 0193606cd2cdc..c50f506d2b53f 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -18,8 +18,8 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - + + @@ -110,15 +110,13 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - - - + + - - + + From 9734212f46c96733d59d0d269814260c28e0808b Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Wed, 13 Aug 2025 19:42:44 -0300 Subject: [PATCH 02/17] [patinho] Using repeat tag for some lamps on the layout. --- src/mame/layout/patinho.lay | 110 +++++++----------------------------- 1 file changed, 19 insertions(+), 91 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index c50f506d2b53f..61fb82ed368f7 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -295,110 +295,38 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + From 9ae2ce9688f1a030ad3b55e9a58b16381d6f636b Mon Sep 17 00:00:00 2001 From: Nicoly Sampaio Date: Mon, 18 Aug 2025 18:05:35 -0300 Subject: [PATCH 03/17] [patinho] update button layout, and add lines --- src/mame/layout/patinho.lay | 458 +++++++++++++++++++++++------------- 1 file changed, 291 insertions(+), 167 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 61fb82ed368f7..4965eee038558 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -1,7 +1,7 @@ @@ -14,8 +14,39 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -119,293 +150,386 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - + + - - - + + + + + + + + - - + + - - - + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - - + + + + + + + + - - + + - - - + + + + + + + + - - + + - - - + + + + + + + + - - + + - - - + + + + + + + + - - + + - - + + - - + + - - + + - - - + + - - - + + - - - + + - - + + - - + + - - - + + - - - + + - - - + + - - + + - - + + - - - + + - - - + + + + + - - + + - - + + - - + + + + + + + + + + + - - + + - - + + + + + + + + + + + - - + + - - + + + + + + + + + + + - - + + - - + + + + + + + + + + + - - + + - - + + + + + + + + + + + - - + + + + + + + + + + + + + + - + + + - - - - - - - - + + + + + + + + + + + + - - + + + + + + - - - - - - - - + + + - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + - - + + - - + + - - + + - - + + - - + + + + + From 47e2f36a306e55f41e105e554a2eeb8c33e7c6f3 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Wed, 20 Aug 2025 20:15:40 -0300 Subject: [PATCH 04/17] desenho do diagrama da ULA em SVG embutido no arquivo de layout do patinho feio --- src/mame/layout/patinho.lay | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 4965eee038558..cb3f737b153fe 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -8,6 +8,17 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + ]]> + + @@ -531,5 +542,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + From ca0143172738ed5038c786dbe82ccb2237280eef Mon Sep 17 00:00:00 2001 From: FelipeNasc Date: Fri, 22 Aug 2025 02:03:34 -0300 Subject: [PATCH 05/17] [patinhofeio] Layout updates: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adicionando algumas linhas e circulos no layout do painel * adicionando linhas no layout do painel * adicionando diagramas em SVG no painel * alterando atributos dos caminhos SVG seguindo as recomendacoes de felipesanches * adicionando diagramas de "PARADO", "EXTERNO", "ENDEREÇAMENTO" E "MEMÓRIA" * ajustes nos diagramas SVG para padronização do código * adicionando últimas linhas e as setas no layout do diagrama de dados --- src/mame/layout/patinho.lay | 564 +++++++++++++++++++++++++++++++++++- 1 file changed, 562 insertions(+), 2 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index cb3f737b153fe..0e9a8b423d0b0 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -1,7 +1,7 @@ @@ -12,13 +12,146 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + @@ -52,6 +185,10 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + @@ -514,6 +651,101 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -543,6 +775,334 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1fae5406a3bbb06e41cbbaec46fa13a1cd73a033 Mon Sep 17 00:00:00 2001 From: Nicoly Sampaio Date: Tue, 9 Sep 2025 17:06:58 -0300 Subject: [PATCH 06/17] =?UTF-8?q?add=20modo=20de=20opera=C3=A7=C3=A3o=20li?= =?UTF-8?q?nes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mame/layout/patinho.lay | 139 ++++++++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 12 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 0e9a8b423d0b0..afebc7e77d9e3 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -248,12 +248,12 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + - + @@ -287,12 +287,12 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + - + @@ -578,7 +578,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -651,11 +651,11 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + - + @@ -726,6 +726,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + @@ -745,8 +746,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + - + @@ -775,7 +777,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -835,6 +837,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + @@ -848,8 +851,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + - + @@ -917,7 +921,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -949,7 +953,118 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From b3d8a729455fb69837e5cd421947cab62a03610e Mon Sep 17 00:00:00 2001 From: FelipeNasc Date: Sat, 20 Sep 2025 16:44:41 -0300 Subject: [PATCH 07/17] [patinhofeio] Layout updates: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add rotary switches layout * update rotary switches layout * add fases de operação lamps/buttons * add switch states * add switches input attributes and "fases de operacao" lamps states * update buttons elements * change buttons order * change elements order and adjust comments * update switch background diagrams --- src/mame/layout/patinho.lay | 485 ++++++++++++++++++++---------------- 1 file changed, 264 insertions(+), 221 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index afebc7e77d9e3..d27e0831422dc 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -8,6 +8,8 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + @@ -19,6 +21,84 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -84,14 +164,20 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - + + + + + + + + + ]]> @@ -126,7 +212,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> @@ -136,7 +222,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> @@ -146,43 +232,76 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,21 +406,25 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + - - + + + + + + @@ -396,188 +519,6 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -854,7 +795,6 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - @@ -1064,6 +1004,77 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1101,7 +1112,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -1158,7 +1169,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -1219,5 +1230,37 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7b9953fd949320999d62d8b8371e2b1b51bc1268 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 6 Oct 2025 16:42:17 -0300 Subject: [PATCH 08/17] Use modern technique for controlling led-buttons on the Patinho Feio artwork/driver --- src/mame/layout/patinho.lay | 18 ++++++++++++------ src/mame/usp/patinho_feio.cpp | 12 +++--------- src/mame/usp/patinhofeio.h | 2 ++ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index d27e0831422dc..07f8e2cf01693 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -1005,42 +1005,48 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + + - + + - + + - + + - + + - + + diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinho_feio.cpp index 8fe1d6c173ced..90c231721ee17 100644 --- a/src/mame/usp/patinho_feio.cpp +++ b/src/mame/usp/patinho_feio.cpp @@ -29,17 +29,9 @@ void patinho_feio_state::init_patinho_feio() void patinho_feio_state::update_panel(uint8_t ACC, uint8_t opcode, uint8_t mem_data, uint16_t mem_addr, uint16_t PC, uint8_t FLAGS, uint16_t RC, uint8_t mode){ char lamp_id[11]; - static char const *const button_names[] = { - "NORMAL", - "CICLOUNICO", - "INSTRUCAOUNICA", - "ENDERECAMENTO", - "ARMAZENAMENTO", - "EXPOSICAO" - }; for (int i=0; i<6; i++){ - m_out->set_value(button_names[i], (mode == i) ? 1 : 0); + m_mode_button[i] = (mode == i) ? 1 : 0; } for (int i=0; i<8; i++){ @@ -189,6 +181,8 @@ void patinho_feio_state::machine_start(){ m_teletype_timer = timer_alloc(FUNC(patinho_feio_state::teletype_callback), this); m_decwriter_timer = timer_alloc(FUNC(patinho_feio_state::decwriter_callback), this); + m_mode_button.resolve(); + // Copy some programs directly into RAM. // This is a hack for setting up the computer // while we don't support loading programs diff --git a/src/mame/usp/patinhofeio.h b/src/mame/usp/patinhofeio.h index 8b20eeb6be575..9b6e00652ed38 100644 --- a/src/mame/usp/patinhofeio.h +++ b/src/mame/usp/patinhofeio.h @@ -14,6 +14,7 @@ class patinho_feio_state : public driver_device { , m_maincpu(*this, "maincpu") , m_decwriter(*this, "decwriter") , m_tty(*this, "teletype") + , m_mode_button(*this, "MODE_BUTTON%u", 0U) { } void init_patinho_feio(); @@ -42,6 +43,7 @@ class patinho_feio_state : public driver_device { required_device m_tty; private: + output_finder<6> m_mode_button; uint8_t* paper_tape_data = nullptr; uint32_t paper_tape_length = 0; uint32_t paper_tape_address = 0; From ecb5f217a6f0e76b93f24f117daf20a0120efe63 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 6 Oct 2025 16:50:07 -0300 Subject: [PATCH 09/17] [patinhofeio] Fix input of selectors (memoria & enderecamento) --- src/mame/layout/patinho.lay | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 07f8e2cf01693..59d85136b9c97 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -1236,13 +1236,13 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - + + - - + + From 5d5eb182b2dd5167874a72d2c2e7ae23c8947187 Mon Sep 17 00:00:00 2001 From: FelipeNasc Date: Sat, 11 Oct 2025 17:17:13 -0300 Subject: [PATCH 10/17] [patinhofeio] layout updates: * adjust 'FASES DE OPERACAO' lines * organize elements of 'fases de operacao' diagram in the code * connect 'fases de operacao' diagram lines * adjust 'modo de operacao' lines * update 'modo de operacao' rectangular diagram * adjust circle positions * adjust 'preparacao' & 'comando' lines * adjust bold line diagrams * adjust simple line diagrams --- src/mame/layout/patinho.lay | 306 ++++++++++++++++-------------------- 1 file changed, 139 insertions(+), 167 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 59d85136b9c97..48b8d4e9bf064 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -111,7 +111,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + - <svg width="338" height="34"> + <svg width="339" height="34"> <path fill="none" stroke="#000" stroke-width="4" d=" @@ -304,6 +304,28 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </rect> </element> + <element name="memory_rect"> + <rect> + <bounds x="0" y="0" width="311" height="67"/> + <color red="0" green="0" blue="0"/> + </rect> + <rect> + <bounds x="2" y="2" width="308" height="64"/> + <color red="0.83" green="0.33" blue="0" /> + </rect> + </element> + + <element name="bold_rect"> + <rect> + <bounds x="0" y="0" width="369" height="73"/> + <color red="0" green="0" blue="0"/> + </rect> + <rect> + <bounds x="4" y="4" width="361" height="65"/> + <color red="0.83" green="0.33" blue="0" /> + </rect> + </element> + <element name="circle"> <disk><color red="0" green="0" blue="0" /></disk> </element> @@ -312,10 +334,6 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <rect><color red="0" green="0" blue="0" /></rect> </element> - <element name="rect"> - <rect><color red="0.83" green="0.33" blue="0" /></rect> - </element> - <element name="panel_background"> <rect><color red="0.47" green="0.64" blue="0.51" /></rect> </element> @@ -416,12 +434,8 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <!-- define orange rectangles --> - <element ref="rect"> - <bounds x="382" y="944" width="311" height="68" /> - </element> - - <element ref="rect"> - <bounds x="158" y="65" width="369" height="73" /> + <element ref="bold_rect"> + <bounds x="158" y="65" width="369" height="73"/> </element> <!-- define lamps --> @@ -521,11 +535,11 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <!-- define horizontal lines --> <element ref="line"> - <bounds x="68" y="38" width="1177" height="4" /> + <bounds x="68" y="38" width="1180" height="4" /> </element> <element ref="line"> - <bounds x="525" y="80" width="220" height="4" /> + <bounds x="525" y="80" width="232" height="4" /> </element> <element ref="line"> @@ -537,11 +551,11 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="line"> - <bounds x="109" y="121" width="49" height="4" /> + <bounds x="109" y="121" width="51" height="4" /> </element> <element ref="line"> - <bounds x="109" y="195" width="116" height="4" /> + <bounds x="109" y="195" width="118" height="4" /> </element> <element ref="line"> @@ -569,7 +583,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="line"> - <bounds x="109" y="415" width="74" height="4" /> + <bounds x="109" y="415" width="75" height="4" /> </element> <element ref="line"> @@ -581,7 +595,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="line"> - <bounds x="68" y="451" width="115" height="4" /> + <bounds x="68" y="451" width="117" height="4" /> </element> <element ref="line"> @@ -592,102 +606,104 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="32" y="527" width="545" height="4" /> </element> - <!-- define 'FASES DE OPERACAO' horizontal lines --> + <!-- define 'FASES DE OPERACAO' lines --> <element ref="line"> - <bounds x="72" y="568" width="95" height="1" /> + <bounds x="72" y="568" width="1" height="192" /> + </element> + <element ref="line"> + <bounds x="72" y="568" width="96" height="1" /> + </element> + <element ref="line"> + <bounds x="72" y="760" width="446" height="1" /> </element> - <element ref="line"> - <bounds x="422" y="568" width="95" height="1" /> + <bounds x="422" y="568" width="96" height="1" /> + </element> + <element ref="line"> + <bounds x="517" y="568" width="1" height="192" /> </element> + <!-- BUSCA --> <element ref="line"> <bounds x="72" y="617" width="56" height="1" /> </element> - <element ref="line"> <bounds x="194" y="617" width="56" height="1" /> </element> + <!-- EXECUÇÃO --> <element ref="line"> - <bounds x="250" y="617" width="44" height="1" /> + <bounds x="250" y="617" width="1" height="18" /> </element> - <element ref="line"> - <bounds x="382" y="617" width="44" height="1" /> + <bounds x="250" y="617" width="45" height="1" /> + </element> + <element ref="line"> + <bounds x="384" y="617" width="45" height="1" /> </element> + <!-- INDEXAÇÃO --> + <element ref="line"> + <bounds x="428" y="617" width="1" height="18" /> + </element> <element ref="line"> <bounds x="428" y="617" width="8" height="1" /> </element> - <element ref="line"> - <bounds x="509" y="617" width="8" height="1" /> + <bounds x="510" y="617" width="8" height="1" /> </element> + <!-- 1-5 --> <repeat count="5"> - <param name="line1_x" start="72" increment="89"/> - <param name="line2_x" start="127" increment="89"/> + <param name="line_left" start="72" increment="89"/> + <param name="line_top_right" start="128" increment="89"/> + <element ref="line"> + <bounds x="~line_left~" y="634" width="34" height="1" /> + </element> <element ref="line"> - <bounds x="~line1_x~" y="634" width="33" height="1" /> + <bounds x="~line_top_right~" y="634" width="34" height="1" /> </element> <element ref="line"> - <bounds x="~line2_x~" y="634" width="34" height="1" /> + <bounds x="~line_left~" y="669" width="90" height="1" /> </element> <element ref="line"> - <bounds x="~line1_x~" y="669" width="89" height="1" /> + <bounds x="~line_left~" y="634" width="1" height="36" /> </element> </repeat> + <!-- INDIRETO --> <element ref="line"> - <bounds x="118" y="706" width="133" height="1" /> + <bounds x="118" y="706" width="1" height="55" /> </element> - <element ref="line"> - <bounds x="336" y="706" width="133" height="1" /> - </element> - - <element ref="line"> - <bounds x="118" y="726" width="77" height="1" /> + <bounds x="118" y="706" width="133" height="1" /> </element> - <element ref="line"> - <bounds x="217" y="726" width="77" height="1" /> + <bounds x="337" y="706" width="133" height="1" /> </element> - <element ref="line"> - <bounds x="293" y="726" width="77" height="1" /> + <bounds x="469" y="706" width="1" height="55" /> </element> + <!-- 6 --> <element ref="line"> - <bounds x="392" y="726" width="77" height="1" /> + <bounds x="118" y="726" width="77" height="1" /> </element> - <element ref="line"> - <bounds x="72" y="760" width="445" height="1" /> + <bounds x="217" y="726" width="77" height="1" /> </element> -<!-- TODO: review this: --> - <element ref="line"> - <bounds x="565" y="634" width="6" height="1" /> - </element> - <element ref="line"> - <bounds x="621" y="634" width="6" height="1" /> - </element> <element ref="line"> - <bounds x="565" y="669" width="62" height="1" /> + <bounds x="293" y="726" width="1" height="34" /> </element> + <!-- 7 --> <element ref="line"> - <bounds x="674" y="634" width="4" height="1" /> - </element> - <element ref="line"> - <bounds x="732" y="634" width="4" height="1" /> + <bounds x="293" y="726" width="77" height="1" /> </element> <element ref="line"> - <bounds x="674" y="669" width="62" height="1" /> + <bounds x="393" y="726" width="77" height="1" /> </element> -<!-- end of "TODO: review this" --> <!-- define vertical lines --> <element ref="line"> @@ -695,11 +711,11 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="line"> - <bounds x="68" y="38" width="4" height="413" /> + <bounds x="68" y="38" width="4" height="415" /> </element> <element ref="line"> - <bounds x="109" y="121" width="4" height="294" /> + <bounds x="109" y="121" width="4" height="296" /> </element> <element ref="line"> @@ -718,82 +734,30 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="1246" y="38" width="4" height="295" /> </element> - <!-- define 'FASES DE OPERACAO' vertical lines --> - <element ref="line"> - <bounds x="72" y="568" width="1" height="49" /> - </element> - - <element ref="line"> - <bounds x="517" y="568" width="1" height="49" /> - </element> - - <element ref="line"> - <bounds x="72" y="617" width="1" height="17" /> - </element> - - <element ref="line"> - <bounds x="250" y="617" width="1" height="17" /> - </element> - - <element ref="line"> - <bounds x="428" y="617" width="1" height="17" /> - </element> - - <element ref="line"> - <bounds x="517" y="617" width="1" height="17" /> - </element> - - <repeat count="6"> - <param name="line1_x" start="72" increment="89"/> + <!-- define "PARADO" and "EXTERNO" lines--> + <repeat count="2"> + <param name="line_x_top_left" start="565" increment="110"/> + <param name="line_y_left" start="564" increment="110"/> + <param name="line_x_bottom" start="564" increment="110"/> + <param name="line_y_right" start="626" increment="110"/> + <param name="line_x_top_right" start="622" increment="110"/> <element ref="line"> - <bounds x="~line1_x~" y="634" width="1" height="35" /> + <bounds x="~line_x_top_left~" y="633" width="4" height="1"/> + </element> + <element ref="line"> + <bounds x="~line_y_left~" y="633" width="1" height="37"/> + </element> + <element ref="line"> + <bounds x="~line_x_bottom~" y="668" width="62" height="1"/> + </element> + <element ref="line"> + <bounds x="~line_y_right~" y="633" width="1" height="37"/> + </element> + <element ref="line"> + <bounds x="~line_x_top_right~" y="633" width="4" height="1"/> </element> </repeat> - <element ref="line"> - <bounds x="72" y="669" width="1" height="91" /> - </element> - - <element ref="line"> - <bounds x="517" y="669" width="1" height="91" /> - </element> - - <element ref="line"> - <bounds x="118" y="706" width="1" height="20" /> - </element> - - <element ref="line"> - <bounds x="469" y="706" width="1" height="20" /> - </element> - - <element ref="line"> - <bounds x="118" y="726" width="1" height="34" /> - </element> - - <element ref="line"> - <bounds x="293" y="726" width="1" height="34" /> - </element> - - <element ref="line"> - <bounds x="469" y="726" width="1" height="34" /> - </element> - -<!-- TODO: Review this: --> - <element ref="line"> - <bounds x="565" y="634" width="1" height="35" /> - </element> - <element ref="line"> - <bounds x="627" y="634" width="1" height="35" /> - </element> - - <element ref="line"> - <bounds x="674" y="634" width="1" height="35" /> - </element> - <element ref="line"> - <bounds x="736" y="634" width="1" height="35" /> - </element> -<!-- End of "TODO: Review this" --> - <!-- define 'ENTRADA MANUAL DE DADOS' horizontal lines --> <repeat count="12"> <param name="line1_x" start="123" increment="85"/> @@ -898,13 +862,17 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="378" y="942" width="116" height="1"/> </element> <element ref="line"> - <bounds x="378" y="942" width="1" height="23"/> + <bounds x="378" y="942" width="1" height="24"/> </element> <element ref="line"> - <bounds x="693" y="942" width="1" height="23"/> + <bounds x="693" y="942" width="1" height="24"/> </element> <element ref="line"> - <bounds x="580" y="942" width="116" height="1"/> + <bounds x="578" y="942" width="116" height="1"/> + </element> + + <element ref="memory_rect"> + <bounds x="381" y="946" width="311" height="67"/> </element> <!-- define 'MODO DE OPERACAO' lines --> @@ -918,13 +886,13 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="~line_x_top_left~" y="965" width="13" height="1"/> </element> <element ref="line"> - <bounds x="~line_y_left~" y="965" width="1" height="49"/> + <bounds x="~line_y_left~" y="965" width="1" height="50"/> </element> <element ref="line"> <bounds x="~line_x_bottom~" y="1014" width="105" height="1"/> </element> <element ref="line"> - <bounds x="~line_y_right~" y="965" width="1" height="49"/> + <bounds x="~line_y_right~" y="965" width="1" height="50"/> </element> <element ref="line"> <bounds x="~line_x_top_right~" y="965" width="13" height="1"/> @@ -955,19 +923,19 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <param name="line_y_right" start="989" increment="105"/> <param name="line_x_top_right" start="976" increment="105"/> <element ref="line"> - <bounds x="~line_x_top_left~" y="965" width="13" height="1"/> + <bounds x="~line_x_top_left~" y="965" width="14" height="1"/> </element> <element ref="line"> - <bounds x="~line_y_left~" y="965" width="1" height="49"/> + <bounds x="~line_y_left~" y="965" width="1" height="50"/> </element> <element ref="line"> <bounds x="~line_x_bottom~" y="1014" width="105" height="1"/> </element> <element ref="line"> - <bounds x="~line_y_right~" y="965" width="1" height="49"/> + <bounds x="~line_y_right~" y="965" width="1" height="50"/> </element> <element ref="line"> - <bounds x="~line_x_top_right~" y="965" width="13" height="1"/> + <bounds x="~line_x_top_right~" y="965" width="14" height="1"/> </element> </repeat> @@ -975,13 +943,13 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="884" y="1057" width="108" height="1"/> </element> <element ref="line"> - <bounds x="884" y="1014" width="1" height="43"/> + <bounds x="884" y="1014" width="1" height="44"/> </element> <element ref="line"> - <bounds x="884" y="1014" width="316" height="1"/> + <bounds x="884" y="1014" width="315" height="1"/> </element> <element ref="line"> - <bounds x="1200" y="1014" width="1" height="43"/> + <bounds x="1199" y="1014" width="1" height="44"/> </element> <element ref="line"> <bounds x="1092" y="1057" width="108" height="1"/> @@ -989,19 +957,19 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <!-- define 'PREPARACAO' lines --> <element ref="line"> - <bounds x="1094" y="1160" width="13" height="1"/> + <bounds x="1094" y="1160" width="14" height="1"/> </element> <element ref="line"> - <bounds x="1094" y="1111" width="1" height="49"/> + <bounds x="1094" y="1111" width="1" height="50"/> </element> <element ref="line"> - <bounds x="1094" y="1111" width="105" height="1"/> + <bounds x="1094" y="1111" width="106" height="1"/> </element> <element ref="line"> - <bounds x="1200" y="1111" width="1" height="49"/> + <bounds x="1200" y="1111" width="1" height="50"/> </element> <element ref="line"> - <bounds x="1187" y="1160" width="13" height="1"/> + <bounds x="1187" y="1160" width="14" height="1"/> </element> <!-- define buttons --> @@ -1083,11 +1051,11 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <!-- define circles --> <element ref="circle"> - <bounds x="573" y="74" width="11" height="11" /> + <bounds x="574" y="76" width="11" height="11" /> </element> <element ref="circle"> - <bounds x="1241" y="74" width="11" height="11" /> + <bounds x="1241" y="76" width="11" height="11" /> </element> <element ref="circle"> @@ -1095,7 +1063,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="circle"> - <bounds x="573" y="190" width="11" height="11" /> + <bounds x="574" y="190" width="11" height="11" /> </element> <element ref="circle"> @@ -1103,19 +1071,19 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element ref="circle"> - <bounds x="106" y="310" width="11" height="11" /> + <bounds x="106" y="312" width="11" height="11" /> </element> <element ref="circle"> - <bounds x="573" y="310" width="11" height="11" /> + <bounds x="574" y="312" width="11" height="11" /> </element> <element ref="circle"> - <bounds x="573" y="430" width="11" height="11" /> + <bounds x="574" y="431" width="11" height="11" /> </element> <element ref="circle"> - <bounds x="573" y="482" width="11" height="11" /> + <bounds x="574" y="483" width="11" height="11" /> </element> <!-- define panel diagrams --> @@ -1123,8 +1091,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="123" y="195" width="78" height="70" /> </element> + <!-- simple line diagrams --> <element ref="diagram_01"> - <bounds x="152" y="130" width="383" height="34" /> + <bounds x="151" y="130" width="384" height="34" /> </element> <repeat count="3"> @@ -1135,21 +1104,23 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </repeat> <element ref="diagram_03"> - <bounds x="748" y="94" width="351" height="34" /> + <bounds x="746" y="94" width="351" height="34" /> </element> <element ref="diagram_03"> - <bounds x="748" y="210" width="351" height="34" /> + <bounds x="746" y="210" width="351" height="34" /> </element> <element ref="diagram_03"> - <bounds x="748" y="500" width="351" height="34" /> + <bounds x="746" y="500" width="351" height="34" /> </element> + <!-- ula diagrams --> <element ref="diagram_04"> <bounds x="712" y="265" width="405" height="147" /> </element> <element ref="ula"><bounds x="875" y="278" width="81" height="104" /></element> + <!-- switch diagrams --> <element ref="diagram_05"> <bounds x="782" y="624" width="186" height="93" /> </element> @@ -1158,21 +1129,22 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="1014" y="624" width="186" height="93" /> </element> + <!-- bold line diagrams--> <repeat count="3"> <param name="diagram_y" start="180" increment="120"/> <element ref="diagram_06"> - <bounds x="225" y="~diagram_y~" width="226" height="34" /> + <bounds x="223" y="~diagram_y~" width="226" height="34" /> </element> </repeat> <element ref="diagram_07"> - <bounds x="755" y="63" width="338" height="34" /> + <bounds x="753" y="63" width="339" height="34" /> </element> <element ref="diagram_07"> - <bounds x="755" y="180" width="338" height="34" /> + <bounds x="753" y="180" width="339" height="34" /> </element> <element ref="diagram_07"> - <bounds x="755" y="469" width="338" height="34" /> + <bounds x="753" y="469" width="339" height="34" /> </element> <!-- define arrows --> From 1e6c2cb3f9080f1369d94bda97e342fddb37f5a8 Mon Sep 17 00:00:00 2001 From: FelipeNasc <felipens27@gmail.com> Date: Wed, 29 Oct 2025 17:32:30 -0300 Subject: [PATCH 11/17] [patinho] Layout updates: * adjust text elements declaration * add numbers text * add 'entrada manual de dados' text * add title texts * add texts elements (memoria, oct, hex, entrada e saida) * add 'fases de operacao' lamps texts * add 'enderecamento' and 'memoria' texts * update bit lamp texts * adjust bit lamps text scale * adjust buttons text scale * adjust 'comando' and 'preparacao' texts --- src/mame/layout/patinho.lay | 278 ++++++++++++++++++++++++++---------- 1 file changed, 201 insertions(+), 77 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 48b8d4e9bf064..97e6239c3154c 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -339,91 +339,151 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <element name="str_flags_t"> - <text string="TRANSBORDO"><color red="0" green="0" blue="0" /></text> + <text string="T R A N S B O R D O"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_flags_v"> <text string="VAI - UM"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_ula"> - <text string="UNIDADE ARITMÉTICA E LÓGICA" ><color red="0" green="0" blue="0" /></text> + <text string="U N I D A D E"> + <bounds x="0" y="0" width="163" height="15"></bounds><color red="0" green="0" blue="0" /> + </text> + <text string="A R I T M É T I C A E L Ó G I C A"> + <bounds x="0" y="16" width="165" height="16"></bounds><color red="0" green="0" blue="0" /> + </text> </element> - <element name="str_rc"> - <text string="DADOS DO PAINEL"><color red="0" green="0" blue="0" /></text> + <text string="D A D O S D O P A I N E L"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_pc"> - <text string="ENDEREÇO DE INSTRUÇÃO"><color red="0" green="0" blue="0" /></text> + <text string="E N D E R E Ç O D E I N S T R U Ç Ã O"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_mem_addr"> - <text string="ENDEREÇO DA MEMÓRIA"><color red="0" green="0" blue="0" /></text> + <text string="E N D E R E Ç O N A M E M Ó R I A"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_acc"> - <text string="ACUMULADOR"><color red="0" green="0" blue="0" /></text> + <text string="A C U M U L A D O R"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_opcode"> - <text string="CÓDIGO DE INSTRUÇÃO"><color red="0" green="0" blue="0" /></text> + <text string="C Ó D I G O D E I N S T R U Ç Ã O"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_mem_data"> - <text string="DADOS DA MEMÓRIA"><color red="0" green="0" blue="0" /></text> + <text string="D A D O S D A M E M Ó R I A"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_mem"> <text string="MEMÓRIA"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_NORMAL"> - <text string="NORMAL"><color red="0" green="0" blue="0" /></text> + <text string="N O R M A L"><color red="0" green="0" blue="0" /></text> </element> - - <element name="str_CICLOUNICO"> - <text string="CICLO ÚNICO"> - <color red="0" green="0" blue="0" /></text> + <text string="C I C L O Ú N I C O"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_INSTRUCAOUNICA"> - <text string="INSTRUÇÃO ÚNICA"> - <color red="0" green="0" blue="0" /></text> + <text string="I N S T R U Ç Ã O"> + <bounds x="0" y="0" width="68" height="12"></bounds><color red="0" green="0" blue="0" /> + </text> + <text string="Ú N I C A"> + <bounds x="0" y="13" width="68" height="12"></bounds><color red="0" green="0" blue="0" /> + </text> </element> - <element name="str_ENDERECAMENTO"> <text string="ENDEREÇAMENTO"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_ARMAZENAMENTO"> <text string="ARMAZENAMENTO"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_EXPOSICAO"> - <text string="EXPOSIÇÃO"><color red="0" green="0" blue="0" /></text> + <text string="E X P O S I Ç Ã O"><color red="0" green="0" blue="0" /></text> </element> - - - <element name="str_ESPERA"> - <text string="ESPERA"><color red="0" green="0" blue="0" /></text> + <text string="E S P E R A"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_INTERRUPCAO"> <text string="INTERRUPÇÃO"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_PARTIDA"> - <text string="PARTIDA"><color red="0" green="0" blue="0" /></text> + <text string="P A R T I D A"><color red="0" green="0" blue="0" /></text> </element> - <element name="str_PREPARACAO"> <text string="PREPARAÇÃO"><color red="0" green="0" blue="0" /></text> </element> + <element name="str_OCTAL"><text string="OCTAL"><color red="0" green="0" blue="0" /></text></element> + <element name="str_HEXADECIMAL"><text string="HEXADECIMAL"><color red="0" green="0" blue="0" /></text></element> + <element name="str_HEXAD"><text string="HEXAD"><color red="0" green="0" blue="0" /></text></element> + + <element name="str_entrada_dados"> + <text string="E N T R A D A M A N U A L D E D A D O S"><color red="0" green="0" blue="0" /></text> + </element> + <element name="str_fases_operacao"> + <text string="F A S E S D E O P E R A Ç Ã O"><color red="0" green="0" blue="0" /></text> + </element> + <element name="str_modo_operacao"> + <text string="M O D O D E O P E R A Ç Ã O"><color red="0" green="0" blue="0" /></text> + </element> + <element name="str_memoria"><text string="M E M Ó R I A"><color red="0" green="0" blue="0" /></text></element> + <element name="str_comando"><text string="C O M A N D O"><color red="0" green="0" blue="0" /></text></element> + <element name="str_enderecamento_spaces"><text string="E N D E R E Ç A M E N T O"><color red="0" green="0" blue="0" /></text></element> + <element name="str_memoria_spaces"><text string="M E M Ó R I A"><color red="0" green="0" blue="0" /></text></element> + <element name="str_entrada_saida"> + <text string="E N T R A D A"> + <bounds x="0" y="0" width="48" height="18"></bounds><color red="0" green="0" blue="0" /> + </text> + <text string="E"> + <bounds x="0" y="20" width="48" height="18"></bounds><color red="0" green="0" blue="0" /> + </text> + <text string="S A Í D A"> + <bounds x="0" y="40" width="48" height="18"></bounds><color red="0" green="0" blue="0" /> + </text> + </element> + + <element name="str_busca"><text string="B U S C A"><color red="0" green="0" blue="0"/></text></element> + <element name="str_execucao"><text string="E X E C U Ç Ã O"><color red="0" green="0" blue="0"/></text></element> + <element name="str_indexacao"><text string="INDEXAÇÃO"><color red="0" green="0" blue="0"/></text></element> + <element name="str_indireto"><text string="I N D I R E T O"><color red="0" green="0" blue="0"/></text></element> + <element name="str_parado"><text string="PARADO"><color red="0" green="0" blue="0"/></text></element> + <element name="str_externo"><text string="EXTERNO"><color red="0" green="0" blue="0"/></text></element> + + <element name="str_fixo"><text string="F I X O"><color red="0" green="0" blue="0"/></text></element> + <element name="str_sequencial"><text string="SEQÜENCIAL"><color red="0" green="0" blue="0"/></text></element> + <element name="str_liberada"><text string="LIBERADA"><color red="0" green="0" blue="0"/></text></element> + <element name="str_protegida"><text string="PROTEGIDA"><color red="0" green="0" blue="0"/></text></element> + + <!-- numeros 0-9 --> + <repeat count="10"> + <param name="i" start="0" increment="1"/> + <element name="str_num_~i~"> + <!-- text background --> + <rect> + <color red="0.47" green="0.64" blue="0.51" /> + <bounds x="0" y="0" width="18" height="16"/> + </rect> + <!-- text value --> + <text string="~i~"> + <color red="0" green="0" blue="0"/> + <bounds x="0" y="0" width="18" height="16"/> + </text> + </element> + </repeat> + <!-- numeros 10-11 --> + <repeat count="2"> + <param name="i" start="10" increment="1"/> + <element name="str_num_~i~"> + <!-- text background --> + <rect> + <color red="0.47" green="0.64" blue="0.51" /> + <bounds x="0" y="0" width="18" height="16"/> + </rect> + <!-- text value --> + <text string="~i~"> + <color red="0" green="0" blue="0"/> + <bounds x="4" y="0" width="14" height="16"/> + </text> + </element> + </repeat> + <!-- define background --> <view name="Default layout"> @@ -439,6 +499,8 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <!-- define lamps --> + + <!-- ENDEREÇO NA MEMÓRIA --> <repeat count="12"> <param name="lamp_x" start="762" increment="28"/> <param name="lamp_id" start="11" increment="-1"/> @@ -448,10 +510,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_mem_addr"> - <bounds x="840" y="121" width="195" height="18" /> - </element> + <element ref="str_mem_addr"><bounds x="782" y="121" width="290" height="16" /></element> + <!-- ENDEREÇO DE INSTRUÇÃO --> <repeat count="12"> <param name="lamp_x" start="762" increment="28"/> <param name="lamp_id" start="11" increment="-1"/> @@ -461,26 +522,26 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_pc"> - <bounds x="823" y="237" width="214" height="18" /> - </element> + <element ref="str_pc"><bounds x="779" y="235" width="300" height="16" /></element> + <!-- transbordo --> <element name="flags1" ref="bit_lamp" inputtag="FLAGS" inputmask="0x002"> <bounds x="765" y="272" width="11" height="11" /> </element> - <element ref="str_flags_t"> - <bounds x="722" y="301" width="106" height="18" /> - </element> + <element ref="str_flags_t"><bounds x="722" y="297" width="101" height="15" /></element> + <!-- vai-um --> <element name="flags0" ref="bit_lamp" inputtag="FLAGS" inputmask="0x001"> <bounds x="1069" y="272" width="11" height="11" /> </element> - <element ref="str_flags_v"> - <bounds x="1052" y="301" width="57" height="18" /> - </element> + <element ref="str_flags_v"><bounds x="1052" y="297" width="57" height="16" /></element> + + <!-- ula --> + <element ref="str_ula"><bounds x="830" y="390" width="165" height="30" /></element> + <!-- DADOS DO PAINEL --> <repeat count="12"> <param name="lamp_x" start="762" increment="28"/> <param name="lamp_id" start="11" increment="-1"/> @@ -490,10 +551,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_rc"> - <bounds x="830" y="529" width="215" height="18" /> - </element> + <element ref="str_rc"><bounds x="805" y="527" width="240" height="16" /></element> + <!-- ACUMULADOR --> <repeat count="8"> <param name="lamp_x" start="233" increment="28"/> <param name="lamp_id" start="7" increment="-1"/> @@ -503,10 +563,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_acc"> - <bounds x="273" y="239" width="140" height="18" /> - </element> + <element ref="str_acc"><bounds x="266" y="237" width="140" height="16" /></element> + <!-- CÓDIGO DE INSTRUÇÃO --> <repeat count="8"> <param name="lamp_x" start="233" increment="28"/> <param name="lamp_id" start="7" increment="-1"/> @@ -516,10 +575,9 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_opcode"> - <bounds x="251" y="356" width="193" height="18" /> - </element> + <element ref="str_opcode"><bounds x="239" y="356" width="200" height="16" /></element> + <!-- DADOS DA MEMÓRIA --> <repeat count="8"> <param name="lamp_x" start="233" increment="28"/> <param name="lamp_id" start="7" increment="-1"/> @@ -529,9 +587,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> </repeat> - <element ref="str_mem_data"> - <bounds x="242" y="476" width="216" height="18" /> - </element> + <element ref="str_mem_data"><bounds x="248" y="476" width="176" height="16" /></element> <!-- define horizontal lines --> <element ref="line"> @@ -978,7 +1034,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="93" y="994" width="42" height="42" /> </element> <element ref="str_NORMAL"> - <bounds x="90" y="963" width="60" height="18" /> + <bounds x="83" y="960" width="70" height="16" /> </element> <!-- CICLOUNICO --> @@ -986,7 +1042,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="200" y="994" width="42" height="42" /> </element> <element ref="str_CICLOUNICO"> - <bounds x="185" y="963" width="72" height="18" /> + <bounds x="184" y="961" width="78" height="11" /> </element> <!-- INSTRUCAOUNICA --> @@ -994,7 +1050,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="310" y="994" width="42" height="42" /> </element> <element ref="str_INSTRUCAOUNICA"> - <bounds x="294" y="961" width="68" height="22" /> + <bounds x="293" y="960" width="70" height="22" /> </element> <!-- ENDERECAMENTO --> @@ -1002,7 +1058,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="413" y="994" width="42" height="42" /> </element> <element ref="str_ENDERECAMENTO"> - <bounds x="397" y="963" width="70" height="18" /> + <bounds x="393" y="960" width="78" height="16" /> </element> <!-- ARMAZENAMENTO --> @@ -1010,7 +1066,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="520" y="994" width="42" height="42" /> </element> <element ref="str_ARMAZENAMENTO"> - <bounds x="501" y="963" width="72" height="18" /> + <bounds x="497" y="960" width="79" height="16" /> </element> <!-- EXPOSICAO --> @@ -1018,35 +1074,39 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <bounds x="626" y="994" width="42" height="42" /> </element> <element ref="str_EXPOSICAO"> - <bounds x="614" y="963" width="68" height="18" /> + <bounds x="603" y="960" width="78" height="13" /> </element> + <!-- ESPERA --> <element name="ESPERA" ref="button" inputtag="BUTTONS" inputmask="0x040"> <bounds x="915" y="994" width="42" height="42" /> </element> <element ref="str_ESPERA"> - <bounds x="912" y="963" width="58" height="18" /> + <bounds x="907" y="960" width="64" height="16" /> </element> + <!-- INTERRUPCAO --> <element name="INTERRUPCAO" ref="button" inputtag="BUTTONS" inputmask="0x080"> <bounds x="1022" y="994" width="42" height="42" /> </element> <element ref="str_INTERRUPCAO"> - <bounds x="1005" y="963" width="74" height="18" /> + <bounds x="1004" y="960" width="76" height="14" /> </element> + <!-- PARTIDA --> <element name="PARTIDA" ref="sqr_button" inputtag="BUTTONS" inputmask="0x100"> <bounds x="1120" y="992" width="56" height="46" /> </element> <element ref="str_PARTIDA"> - <bounds x="1119" y="962" width="66" height="20" /> + <bounds x="1114" y="960" width="67" height="16" /> </element> + <!-- PREPARACAO --> <element name="PREPARACAO" ref="button" inputtag="BUTTONS" inputmask="0x200"> <bounds x="1128" y="1092" width="42" height="42" /> </element> <element ref="str_PREPARACAO"> - <bounds x="1114" y="1154" width="68" height="18" /> + <bounds x="1114" y="1152" width="70" height="16" /> </element> <!-- define circles --> @@ -1219,26 +1279,90 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a </element> <!-- 'FASES DE OPERACAO' lamps --> + <repeat count="5"> + <param name="i" start="1" increment="1"/> + <param name="x" start="108" increment="89"/> + <element ref="str_num_~i~"><bounds x="~x~" y="626" width="18" height="16"/></element> + </repeat> <!-- labels --> <repeat count="5"> <param name="lamp_x" start="98" increment="89"/> <element ref="state_lamp"> <bounds x="~lamp_x~" y="651" width="36" height="36" /> </element> - </repeat> + </repeat> <!-- lamps --> + <element ref="str_num_6"><bounds x="197" y="717" width="18" height="16"/></element> <element ref="state_lamp"> - <bounds x="579" y="651" width="36" height="36" /> + <bounds x="187" y="742" width="36" height="36" /> </element> + + <element ref="str_num_7"><bounds x="374" y="717" width="18" height="16"/></element> <element ref="state_lamp"> - <bounds x="688" y="651" width="36" height="36" /> + <bounds x="364" y="742" width="36" height="36" /> </element> <element ref="state_lamp"> - <bounds x="187" y="742" width="36" height="36" /> + <bounds x="579" y="651" width="36" height="36" /> </element> <element ref="state_lamp"> - <bounds x="364" y="742" width="36" height="36" /> + <bounds x="688" y="651" width="36" height="36" /> </element> + <!-- texts --> + <element ref="str_entrada_dados"><bounds x="476" y="872" width="321" height="17"/></element> + <element ref="str_fases_operacao"><bounds x="176" y="561" width="240" height="16"/></element> + <element ref="str_modo_operacao"><bounds x="290" y="1049" width="185" height="16"/></element> + <element ref="str_memoria"><bounds x="499" y="931" width="75" height="16"/></element> + <element ref="str_comando"><bounds x="1003" y="1050" width="80" height="16"/></element> + + <element ref="str_enderecamento_spaces"><bounds x="809" y="711" width="136" height="16"/></element> + <element ref="str_memoria"><bounds x="1070" y="711" width="80" height="16"/></element> + + <element ref="str_memoria_spaces"><bounds x="284" y="154" width="115" height="16"/></element> + + <repeat count="12"> + <param name="i" start="0" increment="1"/> + <param name="x" start="157" increment="85"/> + <element ref="str_num_~i~"><bounds x="~x~" y="780" width="18" height="16"/></element> + </repeat> + + <element ref="str_OCTAL"><bounds x="129" y="774" width="32" height="12"/></element> + <element ref="str_HEXADECIMAL"><bounds x="129" y="892" width="64" height="12"/></element> + + <repeat count="3"> + <param name="y1" start="169" increment="120"/> + <param name="y2" start="215" increment="120"/> + + <element ref="str_OCTAL"><bounds x="228" y="~y1~" width="32" height="12"/></element> + <element ref="str_HEXAD"><bounds x="228" y="~y2~" width="32" height="12"/></element> + </repeat> + + <repeat count="2"> + <param name="y1" start="50" increment="115"/> + <param name="y2" start="96" increment="120"/> + + <element ref="str_OCTAL"><bounds x="755" y="~y1~" width="32" height="12"/></element> + <element ref="str_HEXAD"><bounds x="755" y="~y2~" width="32" height="12"/></element> + </repeat> + <element ref="str_OCTAL"><bounds x="755" y="456" width="32" height="12"/></element> + <element ref="str_HEXAD"><bounds x="755" y="505" width="32" height="12"/></element> + + <element ref="str_entrada_saida"><bounds x="137" y="222" width="48" height="36"/></element> + + <!-- fases de operação --> + <element ref="str_busca"><bounds x="136" y="610" width="55" height="16"/></element> + <element ref="str_execucao"><bounds x="297" y="610" width="85" height="16"/></element> + <element ref="str_indexacao"><bounds x="440" y="610" width="69" height="16"/></element> + <element ref="str_indireto"><bounds x="255" y="698" width="80" height="16"/></element> + + <element ref="str_parado"><bounds x="574" y="625" width="46" height="16"/></element> + <element ref="str_externo"><bounds x="682" y="625" width="50" height="16"/></element> + + <!-- switches --> + <element ref="str_fixo"><bounds x="795" y="615" width="40" height="16"/></element> + <element ref="str_sequencial"><bounds x="913" y="615" width="72" height="16"/></element> + <element ref="str_liberada"><bounds x="1012" y="615" width="56" height="16"/></element> + <element ref="str_protegida"><bounds x="1146" y="615" width="68" height="16"/></element> + </view> </mamelayout> From f78fbbfe5e3450664d4d30bec5c709d2a7163b92 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches <juca@members.fsf.org> Date: Mon, 10 Nov 2025 17:54:59 -0300 Subject: [PATCH 12/17] [patinho layout] Sketching drawing of address/data input switches for the control panel. --- src/mame/layout/patinho.lay | 46 ++++++++++++++++++++++++++++------- src/mame/usp/patinho_feio.cpp | 34 ++++++++++++++------------ 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 97e6239c3154c..6b824d1d96a7a 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -244,6 +244,27 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a <disk state="0"><color red="0.3" green="0.02" blue="0.02" /></disk> </element> + <element name="switch" defstate="0"> + <image state="0"> + <data><![CDATA[ + <svg width="24" height="46"> + <polyline style="fill:#808080" points="6,0 18,0 24,17 24,29 0,29 0,17"/> + <rect style="fill:#303030" x="6" y="0" width="12" height="4"/> + <polyline style="fill:#505050" points="6,4 18,4 24,29 0,29"/> + </svg> + + + + + <svg width="24" height="46"> + <polyline style="fill:#808080" points="6,46 18,46 24,29 24,17 0,17 0,29"/> + <rect style="fill:#303030" x="6" y="40" width="12" height="4"/> + <polyline style="fill:#505050" points="6,42 18,42 24,17 0,17"/> + </svg> + + + + @@ -551,6 +572,10 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + @@ -931,6 +956,18 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + + + + + + + + + + + + @@ -1320,15 +1357,6 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - - - - - - - - - diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinho_feio.cpp index 90c231721ee17..85e29eebbd6bc 100644 --- a/src/mame/usp/patinho_feio.cpp +++ b/src/mame/usp/patinho_feio.cpp @@ -202,35 +202,39 @@ void patinho_feio_state::machine_start(){ } static INPUT_PORTS_START( patinho_feio ) - PORT_START("RC") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 0") PORT_CODE(KEYCODE_EQUALS) PORT_TOGGLE - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 1") PORT_CODE(KEYCODE_MINUS) PORT_TOGGLE - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 2") PORT_CODE(KEYCODE_0) PORT_TOGGLE - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 3") PORT_CODE(KEYCODE_9) PORT_TOGGLE - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 4") PORT_CODE(KEYCODE_8) PORT_TOGGLE - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 5") PORT_CODE(KEYCODE_7) PORT_TOGGLE - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 6") PORT_CODE(KEYCODE_6) PORT_TOGGLE - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 7") PORT_CODE(KEYCODE_5) PORT_TOGGLE - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 8") PORT_CODE(KEYCODE_4) PORT_TOGGLE - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 7") PORT_CODE(KEYCODE_3) PORT_TOGGLE - PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 10") PORT_CODE(KEYCODE_2) PORT_TOGGLE - PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RC bit 11") PORT_CODE(KEYCODE_1) PORT_TOGGLE + /* Address/Data input Switches */ + PORT_START("SWITCHES") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #0") PORT_CODE(KEYCODE_EQUALS) PORT_TOGGLE + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #1") PORT_CODE(KEYCODE_MINUS) PORT_TOGGLE + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #2") PORT_CODE(KEYCODE_0) PORT_TOGGLE + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #3") PORT_CODE(KEYCODE_9) PORT_TOGGLE + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #4") PORT_CODE(KEYCODE_8) PORT_TOGGLE + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #5") PORT_CODE(KEYCODE_7) PORT_TOGGLE + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #6") PORT_CODE(KEYCODE_6) PORT_TOGGLE + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #7") PORT_CODE(KEYCODE_5) PORT_TOGGLE + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #8") PORT_CODE(KEYCODE_4) PORT_TOGGLE + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #9") PORT_CODE(KEYCODE_3) PORT_TOGGLE + PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #10") PORT_CODE(KEYCODE_2) PORT_TOGGLE + PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Switch #11") PORT_CODE(KEYCODE_1) PORT_TOGGLE PORT_START("BUTTONS") /* Modo de Operacao: EXECUCAO */ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NORMAL") PORT_CODE(KEYCODE_A) PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CICLO UNICO") PORT_CODE(KEYCODE_S) PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INSTRUCAO UNICA") PORT_CODE(KEYCODE_D) + /* Modo de Operacao: MEMORIA */ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO") PORT_CODE(KEYCODE_Z) PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ARMAZENAMENTO") PORT_CODE(KEYCODE_X) PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXPOSICAO") PORT_CODE(KEYCODE_C) + /* Comando: */ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ESPERA") PORT_CODE(KEYCODE_Q) PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INTERRUPCAO") PORT_CODE(KEYCODE_W) PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PARTIDA") PORT_CODE(KEYCODE_E) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PREPARACAO") PORT_CODE(KEYCODE_R) - /* Switches */ + + /* Memory Toggle Switches */ PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO (Fixo/Sequencial)") PORT_CODE(KEYCODE_N) PORT_TOGGLE PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MEMORIA (Liberada/Protegida)") PORT_CODE(KEYCODE_M) PORT_TOGGLE INPUT_PORTS_END @@ -240,7 +244,7 @@ void patinho_feio_state::patinho_feio(machine_config &config) /* basic machine hardware */ /* CPU @ approx. 500 kHz (memory cycle time is 2usec) */ PATO_FEIO_CPU(config, m_maincpu, 500000); - m_maincpu->rc_read().set_ioport("RC"); + m_maincpu->rc_read().set_ioport("SWITCHES"); m_maincpu->buttons_read().set_ioport("BUTTONS"); m_maincpu->set_update_panel_cb(FUNC(patinho_feio_state::update_panel)); From 10e14ba96510413d81924136d1270ab97d27d6c5 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 17 Nov 2025 12:41:53 -0300 Subject: [PATCH 13/17] [patinho] fix ordering and state of toggle switches --- src/mame/layout/patinho.lay | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mame/layout/patinho.lay b/src/mame/layout/patinho.lay index 6b824d1d96a7a..0971423601ee0 100644 --- a/src/mame/layout/patinho.lay +++ b/src/mame/layout/patinho.lay @@ -245,7 +245,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a - + @@ -254,7 +254,7 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a ]]> - + @@ -958,12 +958,13 @@ Front panel of the Patinho Feio mini-computer with clickable buttons, switches a + - + From 43115a053c9d2b1de592c9dc99d82a43df1f2033 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 17 Nov 2025 12:49:36 -0300 Subject: [PATCH 14/17] [patinho] Change the default selection of PORT_CODES to a more reasonable one (to my personal taste :-D). --- src/mame/usp/patinho_feio.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinho_feio.cpp index 85e29eebbd6bc..0d0ebb7a272d4 100644 --- a/src/mame/usp/patinho_feio.cpp +++ b/src/mame/usp/patinho_feio.cpp @@ -224,19 +224,19 @@ static INPUT_PORTS_START( patinho_feio ) PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INSTRUCAO UNICA") PORT_CODE(KEYCODE_D) /* Modo de Operacao: MEMORIA */ - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO") PORT_CODE(KEYCODE_Z) - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ARMAZENAMENTO") PORT_CODE(KEYCODE_X) - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXPOSICAO") PORT_CODE(KEYCODE_C) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO") PORT_CODE(KEYCODE_F) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ARMAZENAMENTO") PORT_CODE(KEYCODE_G) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("EXPOSICAO") PORT_CODE(KEYCODE_H) /* Comando: */ - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ESPERA") PORT_CODE(KEYCODE_Q) - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INTERRUPCAO") PORT_CODE(KEYCODE_W) - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PARTIDA") PORT_CODE(KEYCODE_E) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PREPARACAO") PORT_CODE(KEYCODE_R) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ESPERA") PORT_CODE(KEYCODE_K) + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("INTERRUPCAO") PORT_CODE(KEYCODE_L) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PARTIDA") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PREPARACAO") PORT_CODE(KEYCODE_M) /* Memory Toggle Switches */ - PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO (Fixo/Sequencial)") PORT_CODE(KEYCODE_N) PORT_TOGGLE - PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MEMORIA (Liberada/Protegida)") PORT_CODE(KEYCODE_M) PORT_TOGGLE + PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENDERECAMENTO (Fixo/Sequencial)") PORT_CODE(KEYCODE_I) PORT_TOGGLE + PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MEMORIA (Liberada/Protegida)") PORT_CODE(KEYCODE_O) PORT_TOGGLE INPUT_PORTS_END void patinho_feio_state::patinho_feio(machine_config &config) From 8fcded3ffdb0090913b88ab08e97ff20509038b2 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 17 Nov 2025 13:45:42 -0300 Subject: [PATCH 15/17] [patinho] No need for a header file here. --- src/mame/usp/patinho_feio.cpp | 64 +++++++++++++++++++++++++++++++---- src/mame/usp/patinhofeio.h | 63 ---------------------------------- 2 files changed, 58 insertions(+), 69 deletions(-) delete mode 100644 src/mame/usp/patinhofeio.h diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinho_feio.cpp index 0d0ebb7a272d4..c2485677f9479 100644 --- a/src/mame/usp/patinho_feio.cpp +++ b/src/mame/usp/patinho_feio.cpp @@ -1,20 +1,72 @@ // license:GPL-2.0+ // copyright-holders:Felipe Sanches /* - Patinho Feio + Patinho Feio - University of São Paulo, 1972 */ #include "emu.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" -#include "softlist.h" #include "cpu/patinhofeio/patinhofeio_cpu.h" -#include "patinhofeio.h" +#include "teleprinter.h" +#include "softlist.h" + #include "patinho.lh" -/* - driver init function -*/ +class patinho_feio_state : public driver_device { +public: + patinho_feio_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_decwriter(*this, "decwriter") + , m_tty(*this, "teletype") + , m_mode_button(*this, "MODE_BUTTON%u", 0U) + { } + + void init_patinho_feio(); + + void decwriter_data_w(uint8_t data); + void decwriter_kbd_input(u8 data); + TIMER_CALLBACK_MEMBER(decwriter_callback); + + void teletype_data_w(uint8_t data); + void teletype_kbd_input(u8 data); + TIMER_CALLBACK_MEMBER(teletype_callback); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER( tape_load ); + + void update_panel(uint8_t ACC, uint8_t opcode, uint8_t mem_data, uint16_t mem_addr, uint16_t PC, uint8_t FLAGS, uint16_t RC, uint8_t mode); + + void patinho_feio(machine_config &config); +protected: + virtual void machine_start() override ATTR_COLD; + + void load_tape(const char* name); + void load_raw_data(const char* name, unsigned int start_address, unsigned int data_length); + + required_device m_maincpu; + required_device m_decwriter; + required_device m_tty; + +private: + output_finder<6> m_mode_button; + uint8_t* paper_tape_data = nullptr; + uint32_t paper_tape_length = 0; + uint32_t paper_tape_address = 0; + + emu_timer *m_decwriter_timer = nullptr; + emu_timer *m_teletype_timer = nullptr; + output_manager *m_out = nullptr; + uint8_t m_prev_ACC = 0; + uint8_t m_prev_opcode = 0; + uint8_t m_prev_mem_data = 0; + uint16_t m_prev_mem_addr = 0; + uint16_t m_prev_PC = 0; + uint8_t m_prev_FLAGS = 0; + uint16_t m_prev_RC = 0; +}; + + void patinho_feio_state::init_patinho_feio() { m_out = &output(); diff --git a/src/mame/usp/patinhofeio.h b/src/mame/usp/patinhofeio.h deleted file mode 100644 index 9b6e00652ed38..0000000000000 --- a/src/mame/usp/patinhofeio.h +++ /dev/null @@ -1,63 +0,0 @@ -// license:GPL2+ -// copyright-holders:Felipe Sanches -#ifndef MAME_USP_PATINHOFEIO_H -#define MAME_USP_PATINHOFEIO_H - -#pragma once - -#include "teleprinter.h" - -class patinho_feio_state : public driver_device { -public: - patinho_feio_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_decwriter(*this, "decwriter") - , m_tty(*this, "teletype") - , m_mode_button(*this, "MODE_BUTTON%u", 0U) - { } - - void init_patinho_feio(); - - void decwriter_data_w(uint8_t data); - void decwriter_kbd_input(u8 data); - TIMER_CALLBACK_MEMBER(decwriter_callback); - - void teletype_data_w(uint8_t data); - void teletype_kbd_input(u8 data); - TIMER_CALLBACK_MEMBER(teletype_callback); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( tape_load ); - - void update_panel(uint8_t ACC, uint8_t opcode, uint8_t mem_data, uint16_t mem_addr, uint16_t PC, uint8_t FLAGS, uint16_t RC, uint8_t mode); - - void patinho_feio(machine_config &config); -protected: - virtual void machine_start() override ATTR_COLD; - - void load_tape(const char* name); - void load_raw_data(const char* name, unsigned int start_address, unsigned int data_length); - - required_device m_maincpu; - required_device m_decwriter; - required_device m_tty; - -private: - output_finder<6> m_mode_button; - uint8_t* paper_tape_data = nullptr; - uint32_t paper_tape_length = 0; - uint32_t paper_tape_address = 0; - - emu_timer *m_decwriter_timer = nullptr; - emu_timer *m_teletype_timer = nullptr; - output_manager *m_out = nullptr; - uint8_t m_prev_ACC = 0; - uint8_t m_prev_opcode = 0; - uint8_t m_prev_mem_data = 0; - uint16_t m_prev_mem_addr = 0; - uint16_t m_prev_PC = 0; - uint8_t m_prev_FLAGS = 0; - uint16_t m_prev_RC = 0; -}; - -#endif // MAME_USP_PATINHOFEIO_H From d4f8a17e01093ffdcd4d1c8338be312de9c3ea85 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 17 Nov 2025 13:50:25 -0300 Subject: [PATCH 16/17] rename file --- src/mame/mame.lst | 2 +- src/mame/usp/{patinho_feio.cpp => patinhofeio.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/mame/usp/{patinho_feio.cpp => patinhofeio.cpp} (100%) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b768d952096c0..9dd4c9115f20e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -47962,7 +47962,7 @@ raiders5ta @source:upl/xxmissio.cpp xxmissio -@source:usp/patinho_feio.cpp +@source:usp/patinhofeio.cpp patinho @source:ussr/apogee.cpp diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinhofeio.cpp similarity index 100% rename from src/mame/usp/patinho_feio.cpp rename to src/mame/usp/patinhofeio.cpp From 407e21841e0b1669cc0483b3709be534f097bfa5 Mon Sep 17 00:00:00 2001 From: Felipe Correa da Silva Sanches Date: Mon, 17 Nov 2025 13:53:11 -0300 Subject: [PATCH 17/17] [patinho] anonymous namespace --- src/mame/usp/patinhofeio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mame/usp/patinhofeio.cpp b/src/mame/usp/patinhofeio.cpp index c2485677f9479..d6ddb369b1d95 100644 --- a/src/mame/usp/patinhofeio.cpp +++ b/src/mame/usp/patinhofeio.cpp @@ -13,6 +13,8 @@ #include "patinho.lh" +namespace { + class patinho_feio_state : public driver_device { public: patinho_feio_state(const machine_config &mconfig, device_type type, const char *tag) @@ -358,5 +360,7 @@ ROM_START( patinho ) ROM_LOAD( "micro-pre-loader.bin", 0x000, 0x02a, CRC(1921feab) SHA1(bb063102e44e9ab963f95b45710141dc2c5046b0) ) ROM_END +} // anonymous namespace + // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1972, patinho, 0, 0, patinho_feio, patinho_feio, patinho_feio_state, init_patinho_feio, "Escola Politecnica - Universidade de Sao Paulo", "Patinho Feio" , MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )