tag:blogger.com,1999:blog-22723898588756842432024-02-20T22:23:22.746-08:00Fabrizio Di Vittorio's blogProgramming, Electronics & RetrocomputingFabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-2272389858875684243.post-14587707469423187532020-03-25T05:18:00.002-07:002020-03-25T05:21:32.345-07:00CP/M Plus date-time test utility<br />
<div>
<br /></div>
<div>
This utility reads date-time from SCB (menu option 1), or from BDOS function 105 (menu option 2).</div>
<div>
<br /></div>
<div>
Tests on Amstrad PCW 8512 shows how an interrupt updates SCB datetime.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjve1e4eNHwUQrvbRWJtGg0COlB1w8mQuuHAcZt2Y8MzfwnyFoQD-AEXse7BTZE3cKrBIp57flxbaVbFF2Db7qaMdSzsLd53sglioomgE4FfMab8bjUmat4KLYGmjokKakOomkdFp3XXmA/s1600/Schermata+2020-03-25+alle+13.21.08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="972" data-original-width="712" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjve1e4eNHwUQrvbRWJtGg0COlB1w8mQuuHAcZt2Y8MzfwnyFoQD-AEXse7BTZE3cKrBIp57flxbaVbFF2Db7qaMdSzsLd53sglioomgE4FfMab8bjUmat4KLYGmjokKakOomkdFp3XXmA/s320/Schermata+2020-03-25+alle+13.21.08.png" width="234" /></a></div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.blogger.com/blogger.g?blogID=2272389858875684243&pli=1" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="blob:https://www.blogger.com/05bc9386-04b9-4f5f-a16d-9587c2fe4d8b" style="cursor: move;" width="233" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Source code and compiled COM file:</div>
<div>
<br /></div>
<div>
<a href="https://github.com/fdivitto/CPM3DateTimeTest">https://github.com/fdivitto/CPM3DateTimeTest</a></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-573824106083575892019-04-17T12:48:00.004-07:002019-04-17T12:49:22.880-07:00<br />
<h2 style="text-align: center;">
<b>My ESP32 Graphics library on Hackaday!!</b></h2>
<div>
<b><br /></b></div>
<div style="text-align: center;">
<a href="https://hackaday.com/2019/04/17/fabgl-has-everything-you-need-to-write-games-for-the-esp32/" target="_blank">https://hackaday.com/2019/04/17/fabgl-has-everything-you-need-to-write-games-for-the-esp32/</a></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://hackaday.com/2019/04/17/fabgl-has-everything-you-need-to-write-games-for-the-esp32/" target="_blank"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpXYIjlsPFG1_zZGGEzTVfoYpCKesfH4GfOGeFsMec32XQSLS6jPdyV5gwdqBWLKVR5JalMdMku6tWLRR8OWPLOgHZmHIaH4AJ3qqvxJQfyUEgOQt5sBFGgP8OBLq2_bW70abXISC7jkc/s640/800-7.png" width="640" /></a></div>
<br />
<br />
<br />
<div style="text-align: center;">
<br /></div>
<div>
<br /></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-70092399964150551832018-08-03T00:32:00.001-07:002018-08-04T08:52:40.753-07:00Amiga 600 with Gayle ver.1, VHDL code to implement PAL chip (XU1)<div style="text-align: justify;">
This article is specific to the Amiga 600, so the chip designations, addressing and all the rest are related to this system, even when not explicitly indicated.<br />
<br /></div>
<div style="text-align: justify;">
Gayle is the custom chip that, among many other things, controls the ATA (IDE) port. There are two versions identified by the following chip numbers:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Version 1: 391155-01</div>
<div style="text-align: justify;">
Version 2: 391155-02</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
As far as I could understand, the only difference between the two is the lack (incomplete? Erroneous?) of support for the ATA port in the first version: in detail, version 391155-01 needs an external logic to generate the IDE_CS1 and IDE_CS2 signals, which are needed to control an IDE hard disk.</div>
<br />
<div style="text-align: justify;">
In addition, the external logic controls the RTC_CS (Clock Port 1 selection), SPARE_CS (Clock Port 2 selection) and NET_CS (Arcnet chip selection) signals. Obviously these are also directly handled in the second version of Gayle.</div>
<br />
<div style="text-align: justify;">
In the Amiga this logic is implemented by the XU1 chip, a PAL16L8B, which is a programmable logic that can not be rewritten.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
This is the part of the scheme that shows how Gayle is connected to the PAL:</div>
<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zU_Jg_avnd1XMQd0qN0zurlquPShQ9dFtmRLGE06er3yoPvftCugQweZUfUKvZn20QMjdhYxqEdrGs22pqXijWgb4cmD1BQDXUcSFKv99OrINFXF2QzUgJYT0yN9InjNZ4SlBdYCSrE/s1600/1.png" imageanchor="1"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zU_Jg_avnd1XMQd0qN0zurlquPShQ9dFtmRLGE06er3yoPvftCugQweZUfUKvZn20QMjdhYxqEdrGs22pqXijWgb4cmD1BQDXUcSFKv99OrINFXF2QzUgJYT0yN9InjNZ4SlBdYCSrE/s640/1.png" width="640" /></a></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9GpZaHvjuH5qHyaEc-wp7Wv03XqopZjvcq9MhhNKxzLQToOXmApWFMwDTmvUpqJDg46TrMOu17ztMIWHN-ZnU56aCx_BfALtAHGzwpO1EVQOi_qFmw7YURChY2do3OFlH-K4Mzz9nEk0/s1600/2.png" imageanchor="1"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9GpZaHvjuH5qHyaEc-wp7Wv03XqopZjvcq9MhhNKxzLQToOXmApWFMwDTmvUpqJDg46TrMOu17ztMIWHN-ZnU56aCx_BfALtAHGzwpO1EVQOi_qFmw7YURChY2do3OFlH-K4Mzz9nEk0/s400/2.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
XU1 (the PAL) is mounted on motherboards where there is the first version of Gayle, where XJ1E, XJ1D, XJ1C, XJ1B and XJ1A jumpers are left open (that is Gayle doesn't handle these signals). In the Amiga I used for the tests the traces have been brutally cut (in fact it was already like that and the goal was just to add an HDD, but there was not the PAL168B chip inside...):</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOcFhe1eeVro1ObFeoo6ZTAuZAJcKn5p9qp2zIyNqfDUsg2QZTVPjTKHlJBPQWjJ6mMLi5VqReHWEHJV-RY3A89Juk-_iR2igCFS6ZfYt3hR6ZauQCWfSDvgXdlFjcOdm22NZWGTEt5U/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOcFhe1eeVro1ObFeoo6ZTAuZAJcKn5p9qp2zIyNqfDUsg2QZTVPjTKHlJBPQWjJ6mMLi5VqReHWEHJV-RY3A89Juk-_iR2igCFS6ZfYt3hR6ZauQCWfSDvgXdlFjcOdm22NZWGTEt5U/s320/4.jpg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
PAL just works as address decoder because the only inputs are the address lines from A12 to A23.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Below I will describe a possible implementation using GAL16V8 and written in VHDL. Unfortunately I could only test that the IDE hard disk actually works (signals IDE_CS1 and IDE_CS2), because I haven't an RTC or Arcnet.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
IDE_CS1 is connected to CS1FX (Host Chip Select 0) and IDE_CS2 is connected to CS3FX (Host Chip Select 1) of the IDE connector. These signals are used to select the required register block (Command Block or Control Block) of the IDE device. Some sites erroneously report that these signals select the active drive.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
On <a href="http://amigawiki.org/">amigawiki.org</a> there is a draft of Gayle <a href="https://www.amigawiki.org/lib/exe/fetch.php?media=de:parts:gayle_specification.pdf" target="_blank">specifications</a> where there is a table that associates the address range to the signals CS1 and CS2:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM9jQes0psZW9yWdASJjtPq9Td_EOu_XXR4lC1XiuBXsZ2bTfIJfCZu7dmxxXDzENnCOkdcdctjV0Z8NmQEfRwyXpq0V-Rwe6ETUYH3GL5M4YWaQjUfM_IE_4Wla8neWK1W4HhT05O4/s1600/3.png" imageanchor="1"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM9jQes0psZW9yWdASJjtPq9Td_EOu_XXR4lC1XiuBXsZ2bTfIJfCZu7dmxxXDzENnCOkdcdctjV0Z8NmQEfRwyXpq0V-Rwe6ETUYH3GL5M4YWaQjUfM_IE_4Wla8neWK1W4HhT05O4/s640/3.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
So the address range dedicated to the IDE is in the 32K block ranging between 0xDA0000 and 0xDA7FFF. However, Amiga memory map tells us that the maximum limit can be extended up to 0xDAFFFF, so in VHDL, the decoding could be implemented like this:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">process (A)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">begin</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> if A(23 downto 16) = x"DA" and A(14) = '0' then</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= A(12);</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= not A(12);</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> else</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> end if;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">end process;</span></div>
<div>
<br /></div>
<div style="text-align: justify;">
Also, according to the memory map, SPARE_CS is activated in the range 0xD80000-0xD8FFFF, while RTC_CS in the range 0xDC0000-0xDCFFFF and finally NET_CS in the range 0xD90000-0xD9FFFF:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">SPARE_CS <= '0' when A(23 downto 16) = x"D8" else '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">RTC_CS <= '0' when A(23 downto 16) = x"DC" else '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">NET_CS <= '0' when A(23 downto 16) = x"D9" else '1';</span></div>
<div>
<br /></div>
<div style="text-align: justify;">
Below there is the complete VHDL code to program the GAL16V8. To compile it and generate the Jedec file you need "Lattice ispLEVER Classic", which can be freely downloaded from here:<br />
<br /></div>
<div>
<a href="http://www.latticesemi.com/ispleverclassic">http://www.latticesemi.com/ispleverclassic</a></div>
<div>
<br /></div>
<div style="text-align: justify;">
Finally, the Jedec compiled file (ie "addr_decoder.jed") can be programmed using a generic programmer like the cheap TL866.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">-- 2018 by Fabrizio Di Vittorio (fdivitto2013@gmail.com)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">library ieee;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">use ieee.std_logic_1164.all;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">use ieee.numeric_std.all;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">entity addr_decoder is</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> port (A: in std_logic_vector (23 downto 12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> RTC_CS: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> NET_CS: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> SPARE_CS: out std_logic);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC: string;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of A: signal is "P1 P2 P3 P4 P5 P6 P7 P8 P9 P11 P13 P14";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of IDE_CS1: signal is "P16";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of IDE_CS2: signal is "P15";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of RTC_CS: signal is "P18";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of NET_CS: signal is "P17";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of SPARE_CS: signal is "P19";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">end addr_decoder;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">architecture Behavioral of addr_decoder is</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">begin </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- IDE_CS1 and IDE_CS2 (IDE HARD DRIVE) selection schema:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- A14 A13 A12 Address Range Signal Selected (LOW)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 0 0 0xDA0000-0xDA0FFF CS1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 0 1 0xDA1000-0xDA1FFF CS2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 1 0 0xDA2000-0xDA2FFF CS1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 1 1 0xDA3000-0xDA3FFF CS2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 0 0 0xDA4000-0xDA4FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 0 1 0xDA5000-0xDA5FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 1 0 0xDA6000-0xDA6FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 1 1 0xDA7000-0xDA7FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> process (A)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> begin</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> if A(23 downto 16) = x"DA" and A(14) = '0' then</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= A(12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= not A(12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> else</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> end if;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> end process;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- SPARE_CS (Real Time Clock) selected (LOW) for address in 0xD80000-0xD8FFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> SPARE_CS <= '0' when A(23 downto 16) = x"D8" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- RTC_CS (Real Time Clock) selected (LOW) for addresses in 0xDC0000-0xDCFFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> RTC_CS <= '0' when A(23 downto 16) = x"DC" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- NET_CS (arcnet chip select) selected (LOW) for addresses in 0xD90000-0xD9FFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> NET_CS <= '0' when A(23 downto 16) = x"D9" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">end Behavioral;</span><br />
<br />
<br />
<br />
<div>
VHDL source and compiled Jedec file can be downloaded from my github profile:<br />
<br />
<a href="https://github.com/fdivitto/Amiga600GALFirmware">https://github.com/fdivitto/Amiga600GALFirmware</a><br />
<br />
<br /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div>
<br /></div>
</div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-61534682302644150902018-07-31T06:45:00.001-07:002018-08-04T08:50:34.567-07:00Amiga 600 con Gayle ver.1, implementazione VHDL del PAL di supporto<div style="text-align: justify;">
Questo articolo è specifico per l'Amiga 600, per cui le denominazioni dei chip, gli indirizzamenti e tutto il resto sono relativi a questo sistema, anche quando non espressamente indicato.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Gayle è il chip custom preposto, tra molte altre cose, al controllo della porta ATA (IDE). Esistono due versioni identificate dai seguenti chip numbers:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Versione 1: 391155-01</div>
<div style="text-align: justify;">
Versione 2: 391155-02</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Per quanto sono riuscito a capire, l'unica differenza tra le due è il mancato (incompleto? erroneo?) supporto alla porta ATA nella prima versione: in pratica la versione 391155-01 ha bisogno di una logica esterna per generare i segnali IDE_CS1 e IDE_CS2, necessari per controllare un hard disk IDE.</div>
<br />
<div style="text-align: justify;">
Inoltre, la logica esterna, controlla i segnali RTC_CS (selezione clock port 1), SPARE_CS (selezione clock port 2) e NET_CS (selezione chip arcnet). Ovviamente anche questi vengono controllati direttamente nella seconda versione di Gayle.</div>
<br />
<div style="text-align: justify;">
Nell'Amiga questa logica è implementata dal chip XU1, un PAL16L8B, cioè una logica programmabile non riscrivibile.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Questa è la parte dello schema che mostra come Gayle è collegato al PAL:</div>
<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zU_Jg_avnd1XMQd0qN0zurlquPShQ9dFtmRLGE06er3yoPvftCugQweZUfUKvZn20QMjdhYxqEdrGs22pqXijWgb4cmD1BQDXUcSFKv99OrINFXF2QzUgJYT0yN9InjNZ4SlBdYCSrE/s1600/1.png" imageanchor="1"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8zU_Jg_avnd1XMQd0qN0zurlquPShQ9dFtmRLGE06er3yoPvftCugQweZUfUKvZn20QMjdhYxqEdrGs22pqXijWgb4cmD1BQDXUcSFKv99OrINFXF2QzUgJYT0yN9InjNZ4SlBdYCSrE/s640/1.png" width="640" /></a></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9GpZaHvjuH5qHyaEc-wp7Wv03XqopZjvcq9MhhNKxzLQToOXmApWFMwDTmvUpqJDg46TrMOu17ztMIWHN-ZnU56aCx_BfALtAHGzwpO1EVQOi_qFmw7YURChY2do3OFlH-K4Mzz9nEk0/s1600/2.png" imageanchor="1"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9GpZaHvjuH5qHyaEc-wp7Wv03XqopZjvcq9MhhNKxzLQToOXmApWFMwDTmvUpqJDg46TrMOu17ztMIWHN-ZnU56aCx_BfALtAHGzwpO1EVQOi_qFmw7YURChY2do3OFlH-K4Mzz9nEk0/s400/2.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Ovviamente XU1 (il PAL) è montato solo nelle motherboard dove c'è la prima versione di Gayle, dove i jumpers XJ1E, XJ1D, XJ1C, XJ1B e XJ1A sono aperti (cioè non è Gayle a controllare questi segnali). Nell'Amiga che ho utilizzato per i test sono state tagliate le tracce del circuito stampato (in realtà l'ho già trovato così ed il problema iniziale era proprio quello di aggiungere un HDD, ma non c'era il PAL168B...):</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOcFhe1eeVro1ObFeoo6ZTAuZAJcKn5p9qp2zIyNqfDUsg2QZTVPjTKHlJBPQWjJ6mMLi5VqReHWEHJV-RY3A89Juk-_iR2igCFS6ZfYt3hR6ZauQCWfSDvgXdlFjcOdm22NZWGTEt5U/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOcFhe1eeVro1ObFeoo6ZTAuZAJcKn5p9qp2zIyNqfDUsg2QZTVPjTKHlJBPQWjJ6mMLi5VqReHWEHJV-RY3A89Juk-_iR2igCFS6ZfYt3hR6ZauQCWfSDvgXdlFjcOdm22NZWGTEt5U/s320/4.jpg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il PAL funziona solamente da address decoding in quanto gli unici input solo le linee di indirizzo da A12 a A23.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Di seguito descriverò una possibile implementazione su GAL16V8 scritta in VHDL. L'unico test che ho potuto fare è il funzionamento di un hard disk IDE (segnali IDE_CS1 e IDE_CS2), per cui almeno la parte che controlla questi segnali è corretta.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
IDE_CS1 è connesso a CS1FX (Host Chip Select 0) del connettore IDE, mentre IDE_CS2 è connesso a CS3FX (Host Chip Select 1). Questi segnali servono a selezionare il blocco di registri richiesto (command block o control block) del dispositivo IDE. Alcuni siti riportano erroneamente che questi segnali selezionano il drive attivo.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Su <a href="http://amigawiki.org/">amigawiki.org</a> ho trovato le specifiche di Gayle (<a href="https://www.amigawiki.org/lib/exe/fetch.php?media=de:parts:gayle_specification.pdf">https://www.amigawiki.org/lib/exe/fetch.php?media=de:parts:gayle_specification.pdf</a>) dove si trova una tabella che associa il range di indirizzi ai segnali CS1 e CS2:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM9jQes0psZW9yWdASJjtPq9Td_EOu_XXR4lC1XiuBXsZ2bTfIJfCZu7dmxxXDzENnCOkdcdctjV0Z8NmQEfRwyXpq0V-Rwe6ETUYH3GL5M4YWaQjUfM_IE_4Wla8neWK1W4HhT05O4/s1600/3.png" imageanchor="1"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2KM9jQes0psZW9yWdASJjtPq9Td_EOu_XXR4lC1XiuBXsZ2bTfIJfCZu7dmxxXDzENnCOkdcdctjV0Z8NmQEfRwyXpq0V-Rwe6ETUYH3GL5M4YWaQjUfM_IE_4Wla8neWK1W4HhT05O4/s640/3.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Quindi il range di indirizzi dedicati all'IDE è nei 32K che spaziano tra 0xDA0000 e 0xDA7FFF, tuttavia, dalle memory map si vede che il limite massimo può essere esteso fino a 0xDAFFFF, per cui in VHDL la decodifica potrebbe essere implementata così:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">process (A)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">begin</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> if A(23 downto 16) = x"DA" and A(14) = '0' then</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= A(12);</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= not A(12);</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> else</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> end if;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">end process;</span></div>
<div>
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Sempre secondo le memory map che si trovano in rete, SPARE_CS viene attivato nel range 0xD80000-0xD8FFFF, mentre RTC_CS nel range 0xDC0000-0xDCFFFF ed infine NET_CS nel range 0xD90000-0xD9FFFF:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">SPARE_CS <= '0' when A(23 downto 16) = x"D8" else '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">RTC_CS <= '0' when A(23 downto 16) = x"DC" else '1';</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">NET_CS <= '0' when A(23 downto 16) = x"D9" else '1';</span></div>
<div>
<br /></div>
<div style="text-align: justify;">
Di seguito c'è il codice VHDL completo per la programmazione del GAL16V8. Per compilarlo e generare il file Jedec occorre "Lattice ispLEVER Classic", scaricabile gratuitamente da qui: </div>
<div>
<a href="http://www.latticesemi.com/ispleverclassic">http://www.latticesemi.com/ispleverclassic</a></div>
<div>
<br /></div>
<div style="text-align: justify;">
Il file compilato Jedec (per esempio "addr_decoder.jed") può essere programmato nel GAL con un programmatore generico, tipo il TL866.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">-- 2018 by Fabrizio Di Vittorio (fdivitto2013@gmail.com)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">library ieee;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">use ieee.std_logic_1164.all;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">use ieee.numeric_std.all;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">entity addr_decoder is</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> port (A: in std_logic_vector (23 downto 12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> RTC_CS: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> NET_CS: out std_logic;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> SPARE_CS: out std_logic);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC: string;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of A: signal is "P1 P2 P3 P4 P5 P6 P7 P8 P9 P11 P13 P14";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of IDE_CS1: signal is "P16";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of IDE_CS2: signal is "P15";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of RTC_CS: signal is "P18";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of NET_CS: signal is "P17";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> attribute LOC of SPARE_CS: signal is "P19";</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">end addr_decoder;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">architecture Behavioral of addr_decoder is</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">begin </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- IDE_CS1 and IDE_CS2 (IDE HARD DRIVE) selection schema:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- A14 A13 A12 Address Range Signal Selected (LOW)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 0 0 0xDA0000-0xDA0FFF CS1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 0 1 0xDA1000-0xDA1FFF CS2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 1 0 0xDA2000-0xDA2FFF CS1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 0 1 1 0xDA3000-0xDA3FFF CS2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 0 0 0xDA4000-0xDA4FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 0 1 0xDA5000-0xDA5FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 1 0 0xDA6000-0xDA6FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -- 1 1 1 0xDA7000-0xDA7FFF None</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> process (A)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> begin</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> if A(23 downto 16) = x"DA" and A(14) = '0' then</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= A(12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= not A(12);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> else</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS1 <= '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> IDE_CS2 <= '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> end if;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> end process;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- SPARE_CS (Real Time Clock) selected (LOW) for address in 0xD80000-0xD8FFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> SPARE_CS <= '0' when A(23 downto 16) = x"D8" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- RTC_CS (Real Time Clock) selected (LOW) for addresses in 0xDC0000-0xDCFFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> RTC_CS <= '0' when A(23 downto 16) = x"DC" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> -- NET_CS (arcnet chip select) selected (LOW) for addresses in 0xD90000-0xD9FFFF</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> NET_CS <= '0' when A(23 downto 16) = x"D9" else '1';</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">end Behavioral;</span><br />
<br />
<br />
<br />
<div>
Il sorgente VHDL ed il file Jedec compilato si trovano sul mio profilo github:<br />
<br />
<a href="https://github.com/fdivitto/Amiga600GALFirmware">https://github.com/fdivitto/Amiga600GALFirmware</a><br />
<br />
<br /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div>
<br /></div>
</div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-11157249587668803712018-06-11T08:00:00.001-07:002018-06-11T08:45:04.931-07:00File di configurazione SETKEYS per alcuni editor a tutto schermo (Amstrad PCW 8256/8512/9512 - CP/M Plus)<div style="text-align: justify;">
<span style="font-family: inherit;"><b><br /></b></span>
<span style="font-family: inherit;"><b>File di configurazione per l'editor a tutto schermo VDE 2.66</b></span><br />
<br />
VDE (Video Display Editor) è un editor full screen ottimizzato per lo Z80. Il programma di installazione è denominato <span style="font-family: "courier new" , "courier" , monospace;">VI.COM</span> il quale modifica l'eseguibile specificato come parametro (per esempio <span style="font-family: "courier new" , "courier" , monospace;">VDE.COM</span>):<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">VI VDE.COM</span><br />
<br />
Nel menù principale di <span style="font-family: "courier new" , "courier" , monospace;">VI</span> premere <b>T</b> (<span style="font-family: "courier new" , "courier" , monospace;">Terminal installation</span>) per selezionare il tipo di terminale, quindi <b>L</b> (<span style="font-family: "courier new" , "courier" , monospace;">List terminals</span>) per visualizzare la lista. Premere <span style="font-family: "courier new" , "courier" , monospace;">RETURN</span> finché non appare "<span style="font-family: "courier new" , "courier" , monospace;">Amstrad / Heath</span>" come terminale, quindi <b>Y</b> per confermarlo. Premere ESC (<span style="font-family: "courier new" , "courier" , monospace;">EXIT</span><span style="font-family: inherit;"> sul PCW)</span> per tornare al menu principale.<br />
Ora bisogna indicare l'ampiezza dello schermo. Il PCW supporta 90 colonne per 32 righe, di cui 31 sono utilizzabili per l'editing del testo ed una è dedicata all'header. Premere di nuovo <b>T</b> e quindi <b>E</b> (<span style="font-family: "courier new" , "courier" , monospace;">Edit current</span>). Premere <span style="font-family: "courier new" , "courier" , monospace;">RETURN</span> finché non appare "<span style="font-family: "courier new" , "courier" , monospace;">Viewable columns</span>": qui inserire 90 (il default è 80).<br />
Premere <span style="font-family: "courier new" , "courier" , monospace;">RETURN</span> finché non appare "<span style="font-family: "courier new" , "courier" , monospace;">Viewable lines</span>": qui inserire 31 (il default è 24), dopodiché confermare i valori di default per tutte le altre opzioni sempre con <span style="font-family: "courier new" , "courier" , monospace;">RETURN</span> e tornare al menù principale con <span style="font-family: "courier new" , "courier" , monospace;">EXIT</span><span style="font-family: inherit;">.</span><br />
<br />
A questo punto si può salvare con <b>S</b> (<span style="font-family: "courier new" , "courier" , monospace;">Save</span>) oppure impostare altre opzioni con <b>O</b> (<span style="font-family: "courier new" , "courier" , monospace;">Option configuration</span>). Di seguito c'è uno screenshot delle opzioni che ho impostato. La più importante è "<span style="font-family: "courier new" , "courier" , monospace;">Right Margin col</span>" che deve valere 90.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg58kbJwNB3HzeHapFKcoUi09oURhJo3PAW4RpNl2qS2Q-y5PVegFd4IvaK0fM_pzW_byjxAM4yPUP3uHjODM-tMrVpL-YfvqNTAi3TW5ysq4mRcseYyBGGT_4eVp9oSiA-YmJR0ZPf_ZI/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1488" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg58kbJwNB3HzeHapFKcoUi09oURhJo3PAW4RpNl2qS2Q-y5PVegFd4IvaK0fM_pzW_byjxAM4yPUP3uHjODM-tMrVpL-YfvqNTAi3TW5ysq4mRcseYyBGGT_4eVp9oSiA-YmJR0ZPf_ZI/s320/1.jpg" width="297" /></a></div>
<br />
<br />
Da qui in poi l'unico file necessario è <span style="font-family: "courier new" , "courier" , monospace;">VDE.COM</span><span style="font-family: inherit;"> in quanto tutte le configurazioni vengono salvate nell'eseguibile stesso.</span><br />
<br />
<span style="font-family: inherit;"><span style="font-family: inherit;">Questo è il file di configurazione SETKEYS che utilizzo per questo editor:</span><br /><br /><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">14 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑E" Freccia Su => muove il cursore su</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">14 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" SHIFT + Freccia Su => Pagina precedente</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">14 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8F'" ALT + Freccia Su => Inizio documento</span><br /><br /><span style="font-family: "courier new" , "courier" , monospace;"> 6 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑D" Freccia Destra => muove il cursore a destra</span></span><br />
<span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 6 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8D'" ALT + Freccia Destra => Fine riga</span></span></span><br />
<span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 6 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑F" SHIFT + Freccia Destra => parola a destra</span></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">79 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑X" Freccia Giu => muove il cursore giu</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">79 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" SHIFT + Freccia Giu => Pagina successiva</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">79 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#90'" ALT + Freccia Giu => Fine documento</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">15 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑S" Freccia Sinistra => muove il cursore a sinistra</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">15 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8E'" ALT + Freccia Sinistra => Inizio riga</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">15 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑A" SHIFT + Freccia Sinistra => parola a sinistra</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">16 "↑G" DEL-> => elimina carattere sotto il cursore</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">16 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#91'" ALT + DEL-> => elimina caratteri a destra</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">11 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#92'" COPY => copia il blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">11 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#93'" SHIFT + COPY => muove il blocco selezionato</span></div>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; caret-color: rgb(0, 0, 0); color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: justify; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;">11 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#94'" ALT + COPY => elimina il blocco selezionato</span></div>
</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">66 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#95'" STOP => salva ed esce</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">66 A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#96'" ALT + STOP => Abort (annulla mod. ed esci)</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #8D "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span>↑D" Token per Fine riga</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #8E "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span>↑S" Token per Inizio riga</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8F "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" Token per Inizio documento</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #90 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" Token per Inizio documento</span> </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #91 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑Y" Token per Elimina caratteri a destra</span><br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #92 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">C" Token per Copia blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #93 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">V" Token per Muove blocco selezionato</span></div>
<br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; caret-color: rgb(0, 0, 0); color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: justify; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;">E #94 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">Y" Token per Elimina blocco selezionato</span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #95 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span></span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">X" Token per Salva ed esce</span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #96 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span></span></span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">Q" Token per Abort (annulla mod. ed esci)</span></div>
</div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #81 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">B" F1 => Marca inizio del blocco</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">E #82 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">K" F2 => Marca fine del blocco</span><br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; caret-color: rgb(0, 0, 0); color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: justify; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #83 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑L" F3 => continua ricerca</span></span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #84 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑PZ" F4 => Setta placemarker</span></span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #85 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QP" F4 => Cicla tra i placemarkers</span></span></span></div>
</div>
<br /></div>
<div style="text-align: justify;">
<br />
Il file è scaricabile da qui:<br />
<br />
<a href="https://github.com/fdivitto/SETKEYS.COM-files/blob/master/PCW8512/KEYS.VDE">https://github.com/fdivitto/SETKEYS.COM-files/blob/master/PCW8512/KEYS.VDE</a><br />
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br /></span></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-33375955621136562952018-05-31T11:23:00.001-07:002018-08-04T08:47:27.080-07:00Installazione Gotek su Amstrad PCW 9512<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifXsddnGnsPAnNXBxnSpswE9fm7LXSxyrE20vWnDKInkNy4rfPq9AOhug1er4kzkjnNGbP6iriJkhUqizv7OAN19iPbPipSNIX_RGMPgtKGRZqTV-wfcY_pb7YcvitNihfOufb29aIlxY/s1600/IMG_3617.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifXsddnGnsPAnNXBxnSpswE9fm7LXSxyrE20vWnDKInkNy4rfPq9AOhug1er4kzkjnNGbP6iriJkhUqizv7OAN19iPbPipSNIX_RGMPgtKGRZqTV-wfcY_pb7YcvitNihfOufb29aIlxY/s200/IMG_3617.JPG" width="200" /></a></div>
L'Amstrad PCW 9512 può gestire sia drive da 3'' che da 3.5''. La procedura di riconoscimento del tipo di drive installato è effettuata al boot del CP/M (o del Locoscript). Prima di tutto il boot cerca di scoprire su quale versione del PCW sta girando effettuando alcuni tentativi sul controller del disco.<br />
<br />
Questo viene effettuato mettendo i motori in stop (segnale MOTOR = HIGH) e inviando al controller un comando di "Sense Drive Status" per il drive A (S0 = LOW) finché questo no ritorna "Drive Not Ready". Qui nasce un problema in quanto il Gotek, ignorando il segnale Motor, risponde Ready ogni volta che S0 è LOW. La procedura entra in un ciclo infinito ed il boot non va avanti.<br />
<br /></div>
<div style="text-align: justify;">
Con un solo drive la soluzione è semplice: basta togliere il jump da S0 e metterlo su MO. Così il drive A è selezionato ogni volta che MO = LOW, anziché S0, che questa volta viene ignorato. Ciò permette alla procedura di boot di avere il Not Ready da A.<br />
<br />
In figura è mostrato il connettore dove inserire i jumpers. Da notare che il lato sinistro di S0, S1 e MO è collegato ai rispettivi segnali provenienti dal PCW, mentre al lato destro sono collegati insieme (cortocircuitati) e vanno a confluire in un unico ingresso del Gotek.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tCLWJzCfnmg5GIU-tSCMqR9FJ-x63mYMxpkRMKRIk0YhCqIQtFe93CA7p-m2nX44xfECdNSCg9THcfZXkIrLIUKbiB37r9sZapsdeVKrQuZ-bWpX2QaYC23iySG249GCvJnqMUhLVuI/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="347" data-original-width="175" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tCLWJzCfnmg5GIU-tSCMqR9FJ-x63mYMxpkRMKRIk0YhCqIQtFe93CA7p-m2nX44xfECdNSCg9THcfZXkIrLIUKbiB37r9sZapsdeVKrQuZ-bWpX2QaYC23iySG249GCvJnqMUhLVuI/s200/1.png" width="100" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Con due drive non si può utilizzare solo MO per selezionare il drive A, perché il segnale è unico e viene attivato per entrambi i dispositivi.</div>
<div style="text-align: justify;">
Così è necessario che il drive A si attivi nel momento in cui sia MO che S0 abbiano un valore LOW (tutti i segnali sono in logica negata). Mentre per il drive B è sufficiente il segnale S1.</div>
<div style="text-align: justify;">
Una singola porta logica OR è adatta allo scopo perché la sua uscita è LOW solo quando entrambi gli ingressi sono LOW (Gotek selezionato), negli altri casi resta HIGH (Gotek non selezionato). Questo è lo schema del circuito che ho realizzato:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfSr9Exnp1QqqcR2iEiul5dEHjMb7w89l6I8xX9dgr92KPfWQsPeZBguoFggTUgk7Us60KouDzUdcfY8D7Uqz-dnwh8h_XqKGAZknFs74yEix-SEFhLxSODURe6_18N6LeYYTJ3IbcCJU/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="470" data-original-width="1214" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfSr9Exnp1QqqcR2iEiul5dEHjMb7w89l6I8xX9dgr92KPfWQsPeZBguoFggTUgk7Us60KouDzUdcfY8D7Uqz-dnwh8h_XqKGAZknFs74yEix-SEFhLxSODURe6_18N6LeYYTJ3IbcCJU/s640/2.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I segnali provenienti dal PCW (S0-LEFT e MO-LEFT) entrano nella prima porta OR dell'integrato SN74LS32, che ne contiene quattro. Gli ingressi delle altre tre porte devono essere collegati a massa. L'uscita (MO-RIGHT) può essere collegata in qualsiasi pin del lato destro dei jumpers (S0, S1 e MO) perché, come detto, questi confluiscono in un unico ingresso. I 5V purtroppo non sono presenti nel connettore, per cui vanno presi nel connettore vicino alla presa di alimentazione del Gotek, accanto alla seriale utilizzata per installare il firmware.<br />
<br />
Queste sono alcune foto del circuito e del posizionamento sul Gotek:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUe3hf5bY3ucrz8toT2v-i18sc9LoA-GuyCtxMkWE9XaOfL-p6rNmtAwhDESX3-XSfhXnlSBMnAQWpKg_eWsaForIrkucf5f4gQv6K0qsAZ7d9FKOJXW6AuC0WG7Lxw4wqTJhKRQ9EyMc/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1375" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUe3hf5bY3ucrz8toT2v-i18sc9LoA-GuyCtxMkWE9XaOfL-p6rNmtAwhDESX3-XSfhXnlSBMnAQWpKg_eWsaForIrkucf5f4gQv6K0qsAZ7d9FKOJXW6AuC0WG7Lxw4wqTJhKRQ9EyMc/s320/1.jpg" width="274" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMu4D7V3QUJ-M9UcehsuDWT6kZAANbuUgQjeC_t3Mj8ZY2NEJFPuN4OgEbyuBTY6Xy_-WWbvXEHmd36-5BB5BchpjU-Ub7VEaq21zZV9lEQmUtaLd4VEq25FvwxICCCAkH3teR96RDVko/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="950" data-original-width="1600" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMu4D7V3QUJ-M9UcehsuDWT6kZAANbuUgQjeC_t3Mj8ZY2NEJFPuN4OgEbyuBTY6Xy_-WWbvXEHmd36-5BB5BchpjU-Ub7VEaq21zZV9lEQmUtaLd4VEq25FvwxICCCAkH3teR96RDVko/s320/2.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5tZ-SgBHEihsxvoxYtZsjjNKqjZXtmn60cx2CtoHBXzCzA1UljwcEHqdoCr4ioL27p6oCQeBPVwQMqZPpuFM98lGBy12NGMHA8UJ22Qbutgjkx5omwoKwpqWhW8pu6ltdyY6m_0ZHlYw/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1135" data-original-width="1600" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5tZ-SgBHEihsxvoxYtZsjjNKqjZXtmn60cx2CtoHBXzCzA1UljwcEHqdoCr4ioL27p6oCQeBPVwQMqZPpuFM98lGBy12NGMHA8UJ22Qbutgjkx5omwoKwpqWhW8pu6ltdyY6m_0ZHlYw/s320/3.jpg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Per quanto riguarda il drive B è sufficiente mettere il jumper su S1 perché non viene considerato dalla procedura di riconoscimento descritta sopra.<br />
<br />
Purtroppo per installare i Gotek ho dovuto rimuovere tutto, anche il CRT!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqWVqgOL51sPQ-6m5_ZYyne8OPBlbNN5SCV_uduwRfwFBQ0Kpi74foRVgoqEDbXwrpJNy6-SqUOSHT8oIY4HguKIr4BNMJV7uYtrlWVynavnzL6Pqp5KtALP_-LP-iHJ-_ig_GNuFrMrU/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1145" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqWVqgOL51sPQ-6m5_ZYyne8OPBlbNN5SCV_uduwRfwFBQ0Kpi74foRVgoqEDbXwrpJNy6-SqUOSHT8oIY4HguKIr4BNMJV7uYtrlWVynavnzL6Pqp5KtALP_-LP-iHJ-_ig_GNuFrMrU/s320/4.jpg" width="228" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62dS4HT9oB1lc0WADl8P6G8NynQ5J4LpwiOlRcmlOOacwPrJJk0994SJdKyAXwYIvzwDOB7AylOQ3EzwdNx4G4m21OzHeW3SM9CZuND3EQfTQ94OFE3rmVZO8UpGuHxk18vAwXiQ3Vuk/s1600/5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62dS4HT9oB1lc0WADl8P6G8NynQ5J4LpwiOlRcmlOOacwPrJJk0994SJdKyAXwYIvzwDOB7AylOQ3EzwdNx4G4m21OzHeW3SM9CZuND3EQfTQ94OFE3rmVZO8UpGuHxk18vAwXiQ3Vuk/s320/5.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
L'adattatore da stampare in 3D è scaricabile qui:</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://www.thingiverse.com/thing:2939941">https://www.thingiverse.com/thing:2939941</a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Le informazioni riguardo il boot del PCW ed altri dettagli hardware su questo sistema si trovano qui:</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://www.seasip.info/Unix/Joyce/hardware.pdf">https://www.seasip.info/Unix/Joyce/hardware.pdf</a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<br /></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-44736139344825797522018-05-18T02:16:00.002-07:002018-05-18T02:16:25.500-07:00File di configurazione SETKEYS per alcuni editor a tutto schermo (Amstrad CPC 6128 - CP/M Plus)<div style="text-align: justify;">
<b><br /></b>
<b><br /></b>
<b>File di configurazione per l'editor a tutto schermo ED80.COM dell'Hisoft Devpac80</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjxQbbFztc8RKj1qdrg68bruzhNmxGmIzS0oc4WJ6733I4lXi7Ysmio9EyqfH5U6CsiT_K4X0aYlgLQomnzMick5_1TS7EHNFD3EaZp43WgB8v-OY3SE8xyWygbCDoKYsXnJF_dG8BcQ0/s1600/f2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="36" data-original-width="250" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjxQbbFztc8RKj1qdrg68bruzhNmxGmIzS0oc4WJ6733I4lXi7Ysmio9EyqfH5U6CsiT_K4X0aYlgLQomnzMick5_1TS7EHNFD3EaZp43WgB8v-OY3SE8xyWygbCDoKYsXnJF_dG8BcQ0/s320/f2.jpg" width="320" /></a></div>
ED80 è l'editor a tutto schermo del pacchetto Hisoft Devpac80 (versione 2) e può essere utilizzato anche indipendentemente da quest'ultimo. Infatti basta copiare il file ED80.COM in un altro disco ed utilizzarlo come editor stand alone.</div>
<div style="text-align: justify;">
L'unica cosa da fare è creare un file di configurazione per SETKEYS così da poter utilizzare correttamente la tastiera.</div>
<div style="text-align: justify;">
Ecco il contenuto del file che ho creato per questo editor:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 8 "↑S" Freccia Sinistra => cursore a sinistra</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 8 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑A" SHIFT + Freccia Sinistra => parola a sinistra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 8 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8F'" CTRL + Freccia Sinistra => Inizio riga</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"> 1 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑D" Freccia Destra => cursore a destra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 1 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑F" SHIFT + Freccia Destra => parola a destra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 1 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#90'" CTRL + Freccia Destra => Fine riga</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"> 0 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑E" Freccia Su => Cursore in alto</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 0 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" SHIFT + Freccia Su => Pagina precedente</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 0 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#91'" CTRL + Freccia Su => Inizio documento</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"> 2 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑X" Freccia Giu => cursore in basso</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 2 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" SHIFT + Freccia Giu => Pagina successiva</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 2 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#92'" CTRL + Freccia Giu => Fine documento</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">68 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8D'" TAB => tab a destra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">68 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8E'" SHIFT + TAB => tab a sinistra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">16 "↑G" CLR => elimina carattere sotto il cursore</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">16 C "<span style="font-family: "courier new" , "courier" , monospace;">↑'#93'" CTRL + CLR => elimina caratteri a destra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">16 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#94'" SHIFT + CLR => elimina caratteri a sinistra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">66 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#95'" ESC => salva ed esce</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">9 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#96'" COPY => copia il blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">9 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#97'" SHIFT + COPY => muove il blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">9 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#98'" CTRL + COPY => elimina il blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #8D "</span><span style="font-family: "courier new" , "courier" , monospace;">↑OD" Token per Tab a destra</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #8E "</span><span style="font-family: "courier new" , "courier" , monospace;">↑OS" </span><span style="font-family: "courier new" , "courier" , monospace;">Token</span><span style="font-family: "courier new" , "courier" , monospace;"> per Tab a sinistra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #8F "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QS" </span><span style="font-family: "courier new" , "courier" , monospace;">Token</span><span style="font-family: "courier new" , "courier" , monospace;"> per Inizio riga</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #90 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QD" </span><span style="font-family: "courier new" , "courier" , monospace;">Token</span><span style="font-family: "courier new" , "courier" , monospace;"> per Fine riga</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #91 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QR" Token per Inizio documento</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #92 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QC" Token per Fine documento</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #93 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QY" Token per Elimina car. a destra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #94 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑'127'" Token per Elimina car. a sinistra</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #95 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑OQ" Token per Salva ed esce</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #96 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑KC" Token per Copia blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #97 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑KV" Token per Muove blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #98 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑KY" Token per Elimina blocco selezionato</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #81 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑KB" F1 => Marca inizio del blocco</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #82 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑KK" F2 => Marca fine del blocco</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Questo è il link github del file:</div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><a href="https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.E80">https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.E80</a></span><br />
<br /></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><span style="font-family: inherit;">Occorre notare che il carattere ↑ in questo articolo è l'Unicode U+2191, mentre sul CPC deve essere l'ASCII 0x5E per cui, se si edita il file su Windows dovrà essere sostituito dal simbolo ^ (accento circonflesso).</span> </span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><b>File di configurazione per l'editor a tutto schermo Nevada Edit 3</b></span><br />
<span style="font-family: inherit;"><b><br /></b></span>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ_mXVJrfAwr4VAKwrfP-o2FcVa3F3voXcjXdWkoljrT0y32aMIAxsW2oPTTPPyHJIuNoUORp4XoWkIzperiH5-XjcGVhPvyIUm9nJWSzJepC8K2eQI4gMC9S3ZrSH55fgXaQWLYJjRrU/s1600/f2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ_mXVJrfAwr4VAKwrfP-o2FcVa3F3voXcjXdWkoljrT0y32aMIAxsW2oPTTPPyHJIuNoUORp4XoWkIzperiH5-XjcGVhPvyIUm9nJWSzJepC8K2eQI4gMC9S3ZrSH55fgXaQWLYJjRrU/s200/f2.png" width="200" /></a><span style="font-family: inherit;"><span style="font-family: inherit;">Nevada Edit è un altro editor a tutto schermo. Prima del suo utilizzo va configurato eseguendo il comando NVEDIT.COM e dal menu selezionando il terminale "HEATH Hl9/H89 OR ZENITH Zl9/Z89" (opzione I), che è quello più adatto al CPC.</span></span><br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><br /></span></span>
A questo punto verrà prodotto il file "EDIT.COM" che è l'unico necessario per eseguire l'editor, gli altri posso essere eliminati (NVEDIT.COM, NVEDIT.ERR, NVEDIT.PRN e anche EDTKEY.COM).<br />
Questo è il file di configurazione SETKEYS che utilizzo per questo editor:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑E" Freccia Su => muove il cursore su</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑W" CTRL + Freccia Su => scorre il documento giu</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" SHIFT + Freccia Su => Pagina precedente</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> 2 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑X" Freccia Giu => muove il cursore giu</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Z" CTRL + Freccia Giu => scorre il documento su</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" SHIFT + Freccia Giu => Pagina successiva</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> 8 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑S" Freccia Sinistra => muove il cursore a sinistra</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> 1 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑D" Freccia Destra => muove il cursore a destra</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> 5 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑L" F3 => continua ricerca stringa</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">68 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑I" TAB => tab a destra</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">16 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑G</span><span style="font-family: "courier new" , "courier" , monospace;">" CLR => rimuove carattere sotto il cursore</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑T" CTRL + CLR => elimina caratteri a destra</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">66 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑K" ESC => esce dall'editor</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">66 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8D'" CTRL + ESC => Abort (annulla mod. ed esci)</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8D "</span><span style="font-family: "courier new" , "courier" , monospace;">↑BAB</span><span style="font-family: "courier new" , "courier" , monospace;">↑M" Token per Abort</span><br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;">Questo è il link github del file:</span><br />
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><a href="https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.NVE">https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.NVE</a><span id="goog_2035549984"></span><span id="goog_2035549985"></span><a href="https://www.blogger.com/"></a></span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">Nevada Edit risulta più veloce di ED80, tuttavia lo scrolling è meno intuitivo perché necessita di una combinazione di tasti separata (lo scrolling non avviene spostando il cursore).</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><b>File di configurazione per l'editor a tutto schermo VDE 2.66</b></span><br />
<span style="font-family: inherit;"><b><br /></b></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5v7FPBSacUr8g4MlgNYJQcBzfFk90IIKqWBZiA5lcUzitVlLmPOrmM5ln9I11iMk-uV7-hfTYGw8oj-CjuFElA4Rfk4UbZQQp-_D0GDrJCpeljKKk4ETosPngB1MEY4GtqMXaExm5zEs/s1600/2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="33" data-original-width="152" height="43" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5v7FPBSacUr8g4MlgNYJQcBzfFk90IIKqWBZiA5lcUzitVlLmPOrmM5ln9I11iMk-uV7-hfTYGw8oj-CjuFElA4Rfk4UbZQQp-_D0GDrJCpeljKKk4ETosPngB1MEY4GtqMXaExm5zEs/s200/2.png" width="200" /></a></div>
VDE (Video Display Editor) è un editor full screen ottimizzato per lo Z80 e per questo molto più veloce dei precedenti.<br />
L'installazione va fatta per mezzo del comando VI.COM che modifica l'eseguibile specificato come parametro (per esempio VDE.COM). Tramite VI.COM si può indicare il tipo di terminale e altre opzioni:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">VI VDE.COM</span><br />
<br />
Come terminale (opzione T) selezionare "Amstrad / Heath", poi salvare ed uscire. E' consigliabile usare KEYS.CCP all'interno dell'installer VI. Dopo il salvataggio l'unico eseguibile necessario è VDE.COM.<br />
<br />
<span style="font-family: inherit;"><span style="font-family: inherit;">Questo è il file di configurazione SETKEYS che utilizzo per questo editor (molto simile a quello del DevPac80):</span><br /><br /><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 0 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑E" Freccia Su => muove il cursore su</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 0 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" SHIFT + Freccia Su => Pagina precedente</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 0 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8F'" CTRL + Freccia Su => Inizio documento</span><br /><br /><span style="font-family: "courier new" , "courier" , monospace;"> 1 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑D" Freccia Destra => muove il cursore a destra</span></span><br />
<span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 1 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8D'" CTRL + Freccia Destra => Fine riga</span></span></span><br />
<span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 1 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑F" SHIFT + Freccia Destra => parola a destra</span></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 2 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑X" Freccia Giu => muove il cursore giu</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 2 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" SHIFT + Freccia Giu => Pagina successiva</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 2 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#90'" CTRL + Freccia Giu => Fine documento</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 8 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑S" Freccia Sinistra => muove il cursore a sinistra</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 8 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#8E'" CTRL + Freccia Sinistra => Inizio riga</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 8 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑A" SHIFT + Freccia Sinistra => parola a sinistra</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">16 "↑G" CLR => elimina carattere sotto il cursore</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">16 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#91'" CTRL + CLR => elimina caratteri a destra</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 9 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#92'" COPY => copia il blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 9 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#93'" SHIFT + COPY => muove il blocco selezionato</span></div>
<span style="font-family: "courier new" , "courier" , monospace;"> 9 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'#94'" CTRL + COPY => elimina il blocco selezionato</span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"> 5 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑L" F3 => continua ricerca</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">37 C "↑'ESC'" CTRL + K => ESC</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8D "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑D" Token per Fine riga</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #8E "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span>↑S" Token per Inizio riga</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8F "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑R" Token per Inizio documento</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #90 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑C" Token per Inizio documento</span> </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #91 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑Y" Token per Elimina caratteri a destra</span><br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #92 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'ESC'C" Token per Copia blocco selezionato</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #93 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'ESC'V" Token per Muove blocco selezionato</span></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; caret-color: rgb(0, 0, 0); color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: justify; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;">E #94 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑'ESC'Y" Token per Elimina blocco selezionato</span></div>
<div style="margin: 0px;">
<br /></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">E #81 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">B" F1 => Marca inizio del blocco</span></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; caret-color: rgb(0, 0, 0); color: black; font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: justify; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;">E #82 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'ESC'</span><span style="font-family: "courier new" , "courier" , monospace;">K" F2 => Marca fine del blocco</span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #84 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑PZ" F4 => Setta placemarker</span></span></div>
<div style="margin: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">E #85 "</span><span style="font-family: "courier new" , "courier" , monospace;">↑QP" F5 => Cicla tra i placemarkers</span></span></span></div>
</div>
<br /></div>
<div style="text-align: justify;">
Questo è il link github del file:<br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><a href="https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.VDE">https://github.com/fdivitto/SETKEYS.COM-files/blob/master/CPC/KEYS.VDE</a></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-69717681959965850132018-05-16T09:30:00.000-07:002018-05-16T09:47:19.897-07:00Configurare la tastiera con SETKEYS (Amstrad PCW 8256/8512 e PCW 9512)<br />
<div style="text-align: justify;">
Questo post fa riferimento al contenuto dell'articolo su <a href="https://fabriziodivittorio.blogspot.it/2018/05/configurare-la-tastiera-con-setkeys.html" target="_blank"><b>SETKEYS con il CPC 6128</b></a> ed evidenzia solo le differenze che ci sono rispetto ai PCW 8256, 8512 e 9512.</div>
<div style="text-align: justify;">
Nella serie PCW il CONTROL (CTRL) è sostituito dall'ALT. Oltre a questo è presente un altro tasto di shift (modificatore come CTRL o SHIFT) denominato EXTRA.</div>
<div style="text-align: justify;">
Le tastiere della serie 8000 e 9000 hanno gli stessi tasti e gli stessi codici, cambia soltanto la loro disposizione.</div>
<br />
Questo è il layout ed i codici per la tastiera del PCW 8256/8512:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrtt5bdHIc8-AKGjbAUVJv7s2aU6bSh9vEdTZq_9l8dGaC3m-C1bD-6oTTvb6mymT2GxrLj6h5M5YQBl_VPhUI3bjFuakvoewm0I5IqY0_J6mfXlxYUQLFEx3yQUi024qdqXC5WJTjZJg/s1600/8512-keys.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="424" data-original-width="1508" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrtt5bdHIc8-AKGjbAUVJv7s2aU6bSh9vEdTZq_9l8dGaC3m-C1bD-6oTTvb6mymT2GxrLj6h5M5YQBl_VPhUI3bjFuakvoewm0I5IqY0_J6mfXlxYUQLFEx3yQUi024qdqXC5WJTjZJg/s640/8512-keys.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZKoBj8yvEfNq2Xh5fxw1U-d2RE1BxGEnm_fIJHTt1QJcIrKTrx3gMmAxUE6LYOSrM8Uv7kUSW07qWsEoBwil9yihqjVY04IbvedG3PVMuKE3_jDN0X9cpHTUxtdalkoz8Z2MUarePzY/s1600/8512-codes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="443" data-original-width="1600" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZKoBj8yvEfNq2Xh5fxw1U-d2RE1BxGEnm_fIJHTt1QJcIrKTrx3gMmAxUE6LYOSrM8Uv7kUSW07qWsEoBwil9yihqjVY04IbvedG3PVMuKE3_jDN0X9cpHTUxtdalkoz8Z2MUarePzY/s640/8512-codes.png" width="640" /></a></div>
<span id="goog_1540475499"></span><span id="goog_1540475500"></span><br />
<br />
<br />
Il seguente invece è il layout ed i codici per il PCW 9512:<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwTQM25vZdGGklV4JYC0xameipYfAQu85DrT4ROAwLD4wLaq2GkGwofViks1Sd_fYbvYpKBQlmeCYrDJAxSmKGacZmQO0dXiHnHuNZSYFuaTC54mP0k1z9uY9wa55ATGBf0_eTUWsaepc/s1600/9512-keys.png" imageanchor="1"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwTQM25vZdGGklV4JYC0xameipYfAQu85DrT4ROAwLD4wLaq2GkGwofViks1Sd_fYbvYpKBQlmeCYrDJAxSmKGacZmQO0dXiHnHuNZSYFuaTC54mP0k1z9uY9wa55ATGBf0_eTUWsaepc/s640/9512-keys.png" width="640" /></a></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSqqq_OQeOT1xsK1BFCtF9F_TQd54qRVnuh5WNhPkJ56NXfU_NZNSAIxwBTZCciyOD3hZJ7HKSQLxoE5GKzWnxALiH2z_IDuUrkz2UaVppMcGdw1DxVinIu17GzHuNMx7-PyuXiHNHgFM/s1600/9512-codes.png" imageanchor="1" style="caret-color: rgb(0, 0, 238);"><img border="0" height="194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSqqq_OQeOT1xsK1BFCtF9F_TQd54qRVnuh5WNhPkJ56NXfU_NZNSAIxwBTZCciyOD3hZJ7HKSQLxoE5GKzWnxALiH2z_IDuUrkz2UaVppMcGdw1DxVinIu17GzHuNMx7-PyuXiHNHgFM/s640/9512-codes.png" width="640" /></a></div>
<br />
<br />
Gli stati di shift sono <span style="font-family: "courier new" , "courier" , monospace;">S</span> per SHIFT, <span style="font-family: "courier new" , "courier" , monospace;">A</span> per ALT, <span style="font-family: "courier new" , "courier" , monospace;">E</span> per EXTRA e <span style="font-family: "courier new" , "courier" , monospace;">SA</span> per SHIFT + ALT. Ecco alcuni esempi:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">10 "<span style="text-align: justify;">↑C" COPY genera CTRL+C</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">10 S "<span style="text-align: justify;">↑C" SHIFT + COPY genera CTRL+C</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">10 A "<span style="text-align: justify;">↑C" ALT + COPY genera CTRL+C</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">10 E "<span style="text-align: justify;">↑C" EXTRA + COPY genera CTRL+C</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">10 SA "<span style="text-align: justify;">↑C" SHIFT + ALT + COPY genera CTRL+C</span></span><br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;">I tasti funzione vengono vengono assegnati ai token #81 a #88 (F1..F8).</span><br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;"><br /></span>
<br />
<br />Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com1tag:blogger.com,1999:blog-2272389858875684243.post-50911644186091692702018-05-11T01:20:00.001-07:002018-05-16T09:49:22.930-07:00Configurare la tastiera con SETKEYS (Amstrad CPC 6128 - CP/M Plus)<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMQAmH_Nk_kcyPYx_T7lFYp1M4BJQFTkTQIrBRmYHgpT9swjGHXDbjJ7oGxhayEzkMpN-ZuOk4zpGC9rRe0Ous76zIo58bDOaUhYLQts6OwvVNcC-thZsRvZ1WLcML6X2tyBeB2VSD1_0/s1600/f2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="92" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMQAmH_Nk_kcyPYx_T7lFYp1M4BJQFTkTQIrBRmYHgpT9swjGHXDbjJ7oGxhayEzkMpN-ZuOk4zpGC9rRe0Ous76zIo58bDOaUhYLQts6OwvVNcC-thZsRvZ1WLcML6X2tyBeB2VSD1_0/s320/f2.png" width="320" /></a><br />
In questo articolo descriverò il comando SETKEYS.COM, presente nel primo disco di sistema del CP/M Plus fornito con il CPC 6128.</div>
<div style="text-align: justify;">
<br />
Il comando serve a riconfigurare la tastiera in base alle informazioni contenute nel file di testo specificato come primo ed unico parametr<span style="font-family: inherit;">o:</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">SETKEYS CONF.TXT</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: inherit;">SETKEYS è necessario perché il CP/M, ed in particolare il BIOS scritto per il CPC, non assegna una funzione specifica ad alcuni tasti, come le frecce, i tasti funzione, etc, per cui occorre assegnare a questi un codice di controllo (per esempio come CTRL-A che sposta a sinistra il cursore).</span><br />
<span style="font-family: inherit;">SETKEYS legge il file di configurazione ed installa un RSX (estensione residente al BDOS) che intercetta le chiamate di sistema dedicate all'input dalla console.</span><br />
<br />
<br />
<b>La sintassi del file di configurazione</b><br />
<br /></div>
<div style="text-align: justify;">
Il file di configurazione è diviso in righe ed ogni riga definisce una diversa combinazione di tasti ed il codice che questa genera quando viene eseguita.<br />
Una riga è composta da due parti, la chiave ed il valore associato. La chiave rappresenta il codice (decimale) del tasto premuto e se questo è stato premuto in combinazione con lo SHIFT o il CTRL. Il valore associato viene specificato tra doppi apici e può indicare un singolo carattere, un codice di controllo o un token. Alla fine può essere aggiunto un commento.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Le successive due figure mostrano il layout della tastiera e i codici decimali dei relativi tasti:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0BmJaQW_mQUAet-lb1iLGIzWwRDDOqoefnECm8mxk1tXKpLb_C3vELh6_PDJ6zFGEH2f5X7jWilynMivdS4A880vQJ3heRZsA9qtQviP7RscEOhVzlBbiNuEw_ygGfjPzv84R0azltw/s1600/f1.png" imageanchor="1"><img border="0" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0BmJaQW_mQUAet-lb1iLGIzWwRDDOqoefnECm8mxk1tXKpLb_C3vELh6_PDJ6zFGEH2f5X7jWilynMivdS4A880vQJ3heRZsA9qtQviP7RscEOhVzlBbiNuEw_ygGfjPzv84R0azltw/s640/f1.png" width="640" /></a></div>
<div style="text-align: justify;">
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4qCpEk985B709Kf_f75ybawdGP7dUskquc2P-H305xMKGqRS0MUE1EASEHiLAqneQMTNpUMDuh3svqZCDKxoQFA_viNS-w2rJNVv50P7urBpjGdr2OwNFDe9KIH6Fw6ix6j2gN5EAe9I/s1600/f3.png" imageanchor="1"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4qCpEk985B709Kf_f75ybawdGP7dUskquc2P-H305xMKGqRS0MUE1EASEHiLAqneQMTNpUMDuh3svqZCDKxoQFA_viNS-w2rJNVv50P7urBpjGdr2OwNFDe9KIH6Fw6ix6j2gN5EAe9I/s640/f3.png" width="640" /></a><br />
<br /></div>
<div style="text-align: justify;">
Lo SHIFT è specificato con la lettera <span style="font-family: "courier new" , "courier" , monospace;">S</span>, il CTRL con la <span style="font-family: "courier new" , "courier" , monospace;">C</span>, mente la <span style="font-family: "courier new" , "courier" , monospace;">N</span> oppure la mancanza di <span style="font-family: "courier new" , "courier" , monospace;">S</span> o <span style="font-family: "courier new" , "courier" , monospace;">C</span> indica nessuno SHIFT o CTRL premuto.</div>
<div style="text-align: justify;">
Per esempio <span style="font-family: "courier new" , "courier" , monospace;">69</span> oppure <span style="font-family: "courier new" , "courier" , monospace;">69 N S C</span> indica il solo tasto A, mentre <span style="font-family: "courier new" , "courier" , monospace;">69 S</span>, indica SHIFT+A.<br />
Da notare che la <span style="font-family: "courier new" , "courier" , monospace;">N</span> disabilita sia <span style="font-family: "courier new" , "courier" , monospace;">S</span> che <span style="font-family: "courier new" , "courier" , monospace;">C</span>, per cui queste sequenze sono equivalenti: <span style="font-family: "courier new" , "courier" , monospace;">69</span>, <span style="font-family: "courier new" , "courier" , monospace;">69 N</span>, <span style="font-family: "courier new" , "courier" , monospace;">69 N S</span>, <span style="font-family: "courier new" , "courier" , monospace;">69 N S C</span>.</div>
<div style="text-align: justify;">
La presenza di più di uno shift, per esempio SHIFT e CTRL (<span style="font-family: "courier new" , "courier" , monospace;">S C</span>), non indica la necessità di premere entrambi i tasti, ma solamente che la definizione vale sia che venga premuto solo SHIFT sia che venga premuto solo CTRL.<br />
<br /></div>
<div style="text-align: justify;">
Il valore da generare può essere specificato direttamente (cioè tutti i caratteri ASCII da 0x20 a 0xFF), ad eccezione del ↑ (il tasto del &) che ha un significato speciale e dei doppi apici che vanno preceduti da un ↑ (esempio: <span style="font-family: "courier new" , "courier" , monospace;">↑"</span>).<br />
Per specificare ↑ ne occorrono due (<span style="font-family: "courier new" , "courier" , monospace;">↑↑</span>).<br />
La combinazione di ↑ con un carattere produce CTRL-carattere. Per esempio <span style="font-family: "courier new" , "courier" , monospace;">↑H</span> produce CTRL-H.<br />
La sequenza <span style="font-family: "courier new" , "courier" , monospace;">↑'#xx'</span>, dove <span style="font-family: "courier new" , "courier" , monospace;">xx</span> è un codice esadecimale, produce il carattere con il codice ASCII specificato. Per esempio <span style="font-family: "courier new" , "courier" , monospace;">↑'#A'</span> produce un ritorno a capo. Se il # non è presente allora il codice è decimale anziché esadecimale, così <span style="font-family: "courier new" , "courier" , monospace;">↑'10'</span><span style="font-family: inherit;"> equivale a </span><span style="font-family: "courier new" , "courier" , monospace;">↑'#A'.</span><br />
Infine la sequenza <span style="font-family: "courier new" , "courier" , monospace;">↑'codice'</span>, produce il codice ASCII di controllo relativo. Per esempio <span style="font-family: "courier new" , "courier" , monospace;">↑'ESC'</span> produce ESC. I codici di controllo sono i seguenti:<br />
<span style="font-family: "courier new" , "courier" , monospace;">NUL, SOH, STX, EXT, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, SP, DEL, XON </span><span style="font-family: inherit;">e</span><span style="font-family: "courier new" , "courier" , monospace;"> XOFF.</span><br />
Così <span style="font-family: "courier new" , "courier" , monospace;">↑'10'</span><span style="font-family: inherit;"> equivale a </span><span style="font-family: "courier new" , "courier" , monospace;">↑'#A'</span><span style="font-family: inherit;"> che equivale a </span><span style="font-family: "courier new" , "courier" , monospace;">↑'LF'</span><span style="font-family: inherit;">.</span><br />
<br />
Per esempio si può utilizzare la seguente riga per spostare il cursore a sinistra premendo il tasto freccia relativo:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">8 "↑A"</span><br />
<br />
La definizione specifica che premendo il tasto 8 (freccia a sinistra, senza SHIFT e senza CTRL) venga generato un CTRL-A, che nella console del CP/M serve proprio a spostare il cursore a sinistra di una posizione.<br />
<br />
E' possibile anche "espandere" i "token" in sequenze di caratteri. La combinazione da specificare nella riga è: <span style="font-family: "courier new" , "courier" , monospace;">E #xx "stringa"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">xx</span> è il codice esadecimale del token. Ci sono alcuni token che sono già stati assegnati ai tasti funzione, all'ENTER, al punto e al CTRL+ENTER del tastierino numerico:<br />
0x80 = tasto funzione F0<br />
0x81 = tasto funzione F1<br />
0x82 = tasto funzione F2<br />
0x83 = tasto funzione F3<br />
0x84 = tasto funzione F4<br />
0x85 = tasto funzione F5<br />
0x86 = tasto funzione F6<br />
0x87 = tasto funzione F7<br />
0x88 = tasto funzione F8<br />
0x89 = tasto funzione F9<br />
0x8A = punto nel tastierino numerico<br />
0x8B = ENTER a destra dello spazio<br />
0x8C = CTRL + ENTER a destra dello spazio<br />
<br />
I token non assegnati invece vanno da 0x8D a 0x9F.<br />
<br />
Per esempio se si vuol visualizzare (espandere) "Ciao Mondo!" ogni volta che si preme il tasto funzione F0 occorre aggiungere questa riga:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">E #80 "Ciao Mondo!"</span><br />
<br />
Un token può essere generato da una definizione precedente. Per esempio le seguenti due definizioni visualizzano "Ciao Mondo!" quando si preme CTRL-A. La prima genera il token 0x8D alla pressione di CTRL-A e la seconda genera "Ciao Mondo!" alla presenza del token 0x8D:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">69 C "↑'#8D'" genera 0x8D quando si preme CTRL-A</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8D "Ciao Mondo!" espande 0x8D in "Ciao Mondo!"</span><br />
<br />
All'interno della stringa da espandere ci possono essere dei caratteri di controllo che saranno preceduti sempre da ↑. Per esempio la riga seguente espande il tasto funzione F0 con il comando <span style="font-family: "courier new" , "courier" , monospace;">dir</span> ed invio (CTRL-M):<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">E #80 "dir↑M"</span><br />
<br />
<br />
<b>File di configurazione predefinito keys.cpp</b><br />
<br />
Nel primo disco di sistema del CPC 6128 sono presenti due file di configurazione predefiniti. Il primo ha il nome <span style="font-family: "courier new" , "courier" , monospace;">keys.ccp</span> ed è anche quello caricato di default dal <span style="font-family: "courier new" , "courier" , monospace;">profile.sub</span> (<span style="font-family: "courier new" , "courier" , monospace;">profile.eng</span>) perché configura la tastiera nel modo ottimale per la linea di comando (CCP). Questo è il suo contenuto originale:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 N S C "↑'#1F'" CCP cursor up</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 N S "↑F" cursor right</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 C "↑'#9F'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 N S C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#1E'" cursor down</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 N S "↑A" cursor left</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9E'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 9 N S C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">W" copy</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 N S "↑G" clr</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 C "↑K"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">18 C "↑E" enter </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">66 N S "↑'27'" esc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">66 C "↑C"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">79 C "↑X" del</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #8C "↑R" ctrl enter</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9E "↑F↑B"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9F "↑F↑B↑B"</span><br />
<br />
Date le definizioni del file la tastiera viene configurata in questo modo:<br />
<br />
<b>Freccia Su</b><span style="font-family: "courier new" , "courier" , monospace;"> (0 N S C)</span><br />
Genera il carattere di controllo 0x1F (US - ASCII Unit Separator). Forse è utilizzato da qualche applicazione o estensione ma in realtà non ha alcun utilizzo nella linea di comando.<br />
<br />
<b>Freccia Destra </b><span style="font-family: "courier new" , "courier" , monospace;">(1 N S )</span><br />
Genera CTRL-F che muove il cursore di un carattere a destra.<br />
<br />
<b>CTRL + Freccia Destra </b><span style="font-family: "courier new" , "courier" , monospace;">(1 C)</span><br />
Genera il <u>token 0x9F</u>, che a sua volta genera la sequenza CTRL-F CTRL-B CTRL-B, cioè muovi il cursore a destra, muovi il cursore all'inizio della riga, muovi il cursore alla fine della riga. Come risultato finale muove il cursore alla fine della riga.<br />
<b><br /></b>
<b>Freccia Giu </b><span style="font-family: "courier new" , "courier" , monospace;">(2 N S C)</span><br />
Genera il carattere di controllo 0x1E (RS - ASCII Record Separator). Come per Freccia SU, non sembra avere utilità per la linea di comando.<br />
<br />
<b>Freccia Sinistra </b><span style="font-family: "courier new" , "courier" , monospace;">(8 N S)</span><br />
Genera CTRL-A che muove il cursore di un carattere a sinistra.<br />
<br />
<b>CTRL + Freccia Sinistra </b><span style="font-family: "courier new" , "courier" , monospace;">(8 C)</span><br />
Genera il <u>token 0x9E</u>, che a sua volta genera la sequenza CTRL-F CTRL-B, cioè muovi il cursore a destra e muovi il cursore all'inizio della riga. Come risultato finale muove il cursore all'inizio della riga.<br />
<br />
<b>COPY </b><span style="font-family: "courier new" , "courier" , monospace;">(9 N S C)</span><br />
Genera CTRL-W che richiama l'ultimo comando inserito.<br />
<b><br /></b>
<b>CLR </b><span style="font-family: "courier new" , "courier" , monospace;">(16 N S)</span><br />
Genera CTRL-G che elimina il carattere dov'è posizionato il cursore.<br />
<b><br /></b>
<b>CTRL + CLR </b><span style="font-family: "courier new" , "courier" , monospace;">(16 C)</span><br />
Genera CTRL-K che elimina tutti i caratteri compresi tra la posizione del cursore e la fine della riga.<br />
<b><br /></b>
<b>CTRL + RETURN </b><span style="font-family: "courier new" , "courier" , monospace;">(18 C)</span><br />
Genera CTRL-E che manda a capo il cursore ma non invia il comando al CP/M.<br />
<b><br /></b>
<b>ESC </b><span style="font-family: "courier new" , "courier" , monospace;">(66 N S)</span><br />
Genera il codice di controllo 0x1B (ESC - escape).<br />
<b><br /></b>
<b>CTRL + ESC </b><span style="font-family: "courier new" , "courier" , monospace;">(66 C)</span><br />
Genera CTRL-C, cioè un warm start.<br />
<b><br /></b>
<b>CTRL + DEL </b><span style="font-family: "courier new" , "courier" , monospace;">(79 C)</span><br />
Genera CTRL-X che elimina tutti i caratteri alla sinistra del cursore, mantenendo tutti quelli compresi tra la posizione del cursore e la fine della riga.<br />
<b><br /></b>
<b>CTRL + ENTER </b><span style="font-family: "courier new" , "courier" , monospace;">(E #8C)</span><br />
Genera CTRL-R che va a capo e riscrive la riga corrente fino a dov'era il cursore.<br />
<br />
<br />
<b>File di configurazione predefinito keys.wp</b><br />
<b><br /></b>
L'altro file di configurazione presente nel primo disco ha il nome <span style="font-family: "courier new" , "courier" , monospace;">keys.wp</span> ed ha una configurazione ottimizzato per programmi di word processing, come WordStar o Tasword. Questo è il suo contenuto originale:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 N "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">E" cursor up</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">R"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9E'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 N "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">D" cursor right</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">F"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9C'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 N "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">X" cursor down</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">C"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9F'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 N S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">S" cursor left</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">A"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9D'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 N "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">G" clr</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 S "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">T"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9A'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">66 N S C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'27'" esc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">68 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">V" tab</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">79 C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'#9B'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9A "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">QY"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9B "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">Q</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">'127'"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9C "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">QD"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9D "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">QS"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9E "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">QE"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E #9F "</span><span style="font-family: "courier new" , "courier" , monospace;">↑</span><span style="font-family: "courier new" , "courier" , monospace;">QX"</span><br />
<br />
Date le definizioni del file la tastiera viene configurata in questo modo:<br />
<br />
<b>Freccia SU</b> <span style="font-family: "courier new" , "courier" , monospace;">(0 N)</span><br />
Genera CTRL-E che in Wordstar muove il cursore di una riga in alto.<br />
<br />
<b>SHIFT + Freccia Su</b> <span style="font-family: "courier new" , "courier" , monospace;">(0 S)</span><br />
Genera CTRL-R che in Wordstar muove di una pagina verso l'alto.<br />
<br />
<b>CTRL + Freccia Su</b> <span style="font-family: "courier new" , "courier" , monospace;">(0 C)</span><br />
Genera il token 0x9E che a sua volta genera la sequenza CTRL-Q E, che in Wordsar muove il cursore nella posizione più in alto dello schermo.<br />
<br />
<b>Freccia Destra</b> <span style="font-family: "courier new" , "courier" , monospace;">(1 N)</span><br />
Genera CTRL-D che in Wordstar muove il cursore di un carattere a destra.<br />
<br />
<b>SHIFT + Freccia Destra</b> <span style="font-family: "courier new" , "courier" , monospace;">(1 S)</span><br />
Genera CTRL-F che in Wordwar muove il cursore di una parola a destra.<br />
<br />
<b>CTRL + Freccia Destra</b> <span style="font-family: "courier new" , "courier" , monospace;">(1 C)</span><br />
Genera il token 0x9C che a sua volta genera la sequenza CTRL-Q D, che in Wordstar muove il cursore alla fine della riga.<br />
<br />
<b>Freccia Giu</b> <span style="font-family: "courier new" , "courier" , monospace;">(2 N)</span><br />
Genera CTRL-X che in Wordstar muove il cursore di una riga in basso.<br />
<br />
<b>SHIFT + Freccia Giu</b> <span style="font-family: "courier new" , "courier" , monospace;">(2 S)</span><br />
Genera CTRL-C che in Wordstar muove di una pagina verso il basso.<br />
<br />
<b>CTRL + Freccia Giu</b> <span style="font-family: "courier new" , "courier" , monospace;">(2 C)</span><br />
Genera il token 0x9F che a sua volta genera la sequenza CTRL-Q X, che in Wordstar muove il cursore nella posizione più in basso dello schermo.<br />
<br />
<b>Freccia Sinistra</b> <span style="font-family: "courier new" , "courier" , monospace;">(8 N S)</span><br />
Genera CTRL-S che in Wordstar muove il cursore di un carattere a sinistra.<br />
<br />
<b>SHIFT + Freccia Sinistra</b> <span style="font-family: "courier new" , "courier" , monospace;">(8 S)</span><br />
Genera CTRL-A che in Wordstar muove il cursore di una parola a sinistra.<br />
<br />
<b>CTRL + Freccia Sinistra</b> <span style="font-family: "courier new" , "courier" , monospace;">(8 C)</span><br />
Genera il token 0x9D che a sua volta genera la sequenza CTRL-Q S, che in Wordstar muove il cursore all'inizio della riga.<br />
<br />
<b>CLR</b> <span style="font-family: "courier new" , "courier" , monospace;">(16 N)</span><br />
Genera CTRL-G che in Wordstar (ma anche in CCP) elimina il carattere dov'è posizionato il cursore.<br />
<br />
<b>SHIFT + CLR</b> <span style="font-family: "courier new" , "courier" , monospace;">(16 S)</span><br />
Genera CTRL-T che in Wordstar elimina la parola a destra del cursore.<br />
<br />
<b>CTRL + CLR</b> <span style="font-family: "courier new" , "courier" , monospace;">(16 C)</span><br />
Genera il token 0x9A che a sua volta genera la sequenza CTRL-Q Y, che in Wordstar elimina tutti i caratteri alla destra del cursore.<br />
<br />
<b>ESC</b> <span style="font-family: "courier new" , "courier" , monospace;">(66 N S C)</span><br />
Genera il codice di controllo 0x1B (ESC - escape).<br />
<br />
<b>CTRL + TAB</b> <span style="font-family: "courier new" , "courier" , monospace;">(68 C)</span><br />
Genera CTRL-V che in Wordstar abilita o disabilita la modalità "inserimento".<br />
<br />
<b>CTRL + DEL</b> <span style="font-family: "courier new" , "courier" , monospace;">(79 C)</span><br />
Genera il token 0x9B che a sua volta genera la sequenza CTRL-Q DEL, che in Wordstar elimina tutti i caratteri alla sinistra del cursore.<br />
<br />
<br />
<b>File di configurazione predefinito keys.drl</b><br />
<b><br /></b>
L'ultimo file delle definizioni presente nei dischi di sistema si trova nel terzo disco ed è denominato <span style="font-family: "courier new" , "courier" , monospace;">keys.drl</span>, proprio perché specifico per l'editor del linguaggio di programmazione DR Logo. Questo è il contenuto originale del file:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 N S "↑P" DR LOGO cursor up</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 0 C "↑U" </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 N S "↑F" cursor right </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 1 C "↑E" </span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 N S "↑N" cursor down</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 2 C "↑V"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 N S "↑B" cursor left</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 8 C "↑A"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> 9 N S C "↑C" copy</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">16 N S C "↑D" clr</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">66 N S C "↑G" escape</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">79 N S C "↑H" del</span><br />
<br />
La tastiera viene configurata in questo modo:<br />
<br />
<b>Freccia Su</b> <span style="font-family: "courier new" , "courier" , monospace;">(0 N S)</span><br />
Genera CTRL-P che in DR Logo muove il cursore verso l'alto.<br />
<br />
<b>CTRL + Freccia Su</b> <span style="font-family: "courier new" , "courier" , monospace;">(0 C)</span><br />
Genera CTRL-U che in Dr Logo non ha alcun effetto!<br />
<br />
<b>Freccia Destra</b> <span style="font-family: "courier new" , "courier" , monospace;">(1 N S)</span><br />
Genera CTRL-F che in Dr Logo muove il cursore a destra.<br />
<br />
<b>CTRL + Freccia Destra</b> <span style="font-family: "courier new" , "courier" , monospace;">(1 C)</span><br />
Genera CTRL-E che in Dr Logo muove il cursore alla fine della riga.<br />
<br />
<b>Freccia Giu</b> <span style="font-family: "courier new" , "courier" , monospace;">(2 N S)</span><br />
Genera CTRL-N che in Dr Logo muove il cursore verso il basso.<br />
<br />
<b>CTRL + Freccia Giu</b> <span style="font-family: "courier new" , "courier" , monospace;">(2 C)</span><br />
Genera CTRL-V che in Dr Logo visualizza la pagina successiva.<br />
<br />
<b>Freccia Sinistra</b> <span style="font-family: "courier new" , "courier" , monospace;">(8 N S)</span><br />
Genera CTRL-B che in Dr Logo muove il cursore a sinistra.<br />
<br />
<b>CTRL + Freccia Sinistra</b> <span style="font-family: "courier new" , "courier" , monospace;">(8 C)</span><br />
Genera CTRL-A che in Dr Logo muove il cursore all'inizio della riga.<br />
<br />
<b>COPY</b> <span style="font-family: "courier new" , "courier" , monospace;">(9 N S C)</span><br />
Genera CTRL-C che in Dr Logo esce dall'editor ed applica il suo contenuto.<br />
<br />
<b>CLR</b> <span style="font-family: "courier new" , "courier" , monospace;">(16 N S C)</span><br />
Genera CTRL-D che in Dr Logo cancella il carattere dov'è posizionato il cursore.<br />
<br />
<b>ESC</b> <span style="font-family: "courier new" , "courier" , monospace;">(66 N S C)</span><br />
Genera CTRL-G che in Dr Logo esce dall'editor ma annulla il suo contenuto.<br />
<br />
<b>DEL</b> <span style="font-family: "courier new" , "courier" , monospace;">(79 N S C)</span><br />
Genera CTRL-H che in Dr Logo elimina il carattere alla sinistra del cursore.<br />
<br />
<br />
<br /></div>
Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com4tag:blogger.com,1999:blog-2272389858875684243.post-23680106500752667502018-04-17T02:24:00.000-07:002018-04-17T02:25:12.522-07:00Joyce, l'emulatore Amstrad PCW: installazione e modifiche al codice per il supporto alla tastiera italiana del Macbook Pro<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJanSs3LOtJZI1OmN5gO8KY90wC-JdMg4pWSBr3FUO1qD7KdyYgZ0IV7vwL_y6kkJxi-CGs9sC8FJwuAaGJ2RH0IMuP577AMZ2YOEuIXaZ2c3gYsdR4_Zp0_LPoCmWOyFr1pLEJnRr6XE/s1600/10.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJanSs3LOtJZI1OmN5gO8KY90wC-JdMg4pWSBr3FUO1qD7KdyYgZ0IV7vwL_y6kkJxi-CGs9sC8FJwuAaGJ2RH0IMuP577AMZ2YOEuIXaZ2c3gYsdR4_Zp0_LPoCmWOyFr1pLEJnRr6XE/s1600/10.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJanSs3LOtJZI1OmN5gO8KY90wC-JdMg4pWSBr3FUO1qD7KdyYgZ0IV7vwL_y6kkJxi-CGs9sC8FJwuAaGJ2RH0IMuP577AMZ2YOEuIXaZ2c3gYsdR4_Zp0_LPoCmWOyFr1pLEJnRr6XE/s320/10.jpeg" width="320" /></a><br />
<br />
Questo post descrive la procedura per compilare ed installare l'emulatore Joyce di Amstrad PCW su MacOS e una mia patch al codice sorgente per utilizzare la tastiera italiana del Macbook Pro.<br />
<br />
La documentazione dell'emulatore spiega come personalizzare il layout della tastiera, tuttavia questo va fatto a CP/M già avviato, tramite il comando PCKEY. Ho trovato questo metodo di difficile applicazione, considerando anche che non riuscivo a digitare caratteri basilari come i due punti!<br />
<br /></div>
<div style="text-align: justify;">
Ho quindi deciso di procedere con la via "facile", modificando direttamente il codice Joyce che gestisce la corrispondenza tra la tastiera del PC e quella del sistema emulato. Le modifiche, che si applicano alla versione 2.2.12, l'ho scritte senza badare molto alla forma e senza cercare alternative meno invasive ad una mappatura dei tasti hardcoded nel codice stesso, per cui non è certo un bel esempio di programmazione!<br />
<br />
Joyce permette l'emulazione dei PCW serie 8000, 9000 e PCW10, mentre Anne (che si compila automaticamente con Joyce) emula il PCW16. La patch è stata testata solo con la serie 8000 (PCW 8256 e 8512).</div>
<div style="text-align: justify;">
<br />
Per compilare Joyce occorre prima di tutto installare alcune librerie. Per fare questo userò <span style="font-family: "courier new" , "courier" , monospace;">brew</span>, un tool che porta moltissime applicazioni e librerie di Linux su MacOS. Incollare questa riga sul terminale e premere Invio per installare <span style="font-family: "courier new" , "courier" , monospace;">brew</span>:<br />
<br />
<div style="-webkit-text-stroke-color: rgb(255, 255, 255); -webkit-text-stroke-width: initial; font-stretch: normal; line-height: normal; text-align: left;">
<span style="-webkit-font-kerning: none; background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</span></span></div>
<br />
<br /></div>
<div style="text-align: justify;">
Installare ora tramite <span style="font-family: "courier new" , "courier" , monospace;">brew </span>le librerie necessarie (PNG, SDL e XML):<br />
<br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace;">brew install libpng</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace;">brew install sdl</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace;">brew install libxml2</span><br />
<br />
<br />
Il sito originale di Joyce è <a href="https://www.seasip.info/Unix/Joyce/" target="_blank">https://www.seasip.info/Unix/Joyce/</a>, mentre la versione patchata è scaricabile dal mio profilo <a href="https://github.com/fdivitto/joyce-custom" target="_blank">github</a>, in questo modo:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">git clone https://github.com/fdivitto/joyce-custom.git</span><br />
<br />
<br /></div>
<div style="text-align: justify;">
Terminato il download procedere alla compilazione e all'installazione:<br />
<span style="background-color: white;"><br /></span>
<br />
<div style="font-stretch: normal; line-height: normal;">
<span style="background-color: white; font-variant-ligatures: no-common-ligatures;"><span style="font-family: "courier new" , "courier" , monospace;">cd joyce-custom/</span></span></div>
<div style="font-stretch: normal; line-height: normal;">
<span style="background-color: white; font-variant-ligatures: no-common-ligatures;"><span style="font-family: "courier new" , "courier" , monospace;">./configure</span></span></div>
<div style="font-stretch: normal; line-height: normal;">
<span style="background-color: white; font-variant-ligatures: no-common-ligatures;"><span style="font-family: "courier new" , "courier" , monospace;">make</span></span></div>
<div style="font-stretch: normal; line-height: normal;">
<span style="background-color: white; font-variant-ligatures: no-common-ligatures;"><span style="font-family: "courier new" , "courier" , monospace;">sudo make install</span></span></div>
<div style="font-family: "Andale Mono"; font-size: 13px; font-stretch: normal; line-height: normal;">
<span style="background-color: white; font-variant-ligatures: no-common-ligatures;"><br /></span></div>
<div style="font-family: "Andale Mono"; font-size: 13px; font-stretch: normal; line-height: normal;">
<br /></div>
</div>
A questo punto Joyce è installato e funzionante e si può rimuovere la cartella con i sorgenti.<br />
Per eseguire Joyce basta scrivere:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">xjoyce</span><br />
<br />
<br />
Se appare una finestra bianca premere Invio. Verrà creata la cartella ~\Joyce\Boot dove andranno inserite le immagini (dsk) di boot.<br />
Al primo avvio Joyce necessita di una piccola configurazione e ci chiede da dove effettuare il boot che può essere effettuato sia dai drive fisici (fd0, fd1...) che da un'immagine di un floppy (Disc file):<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoORx5BF7dEBaqdz_X6C8g3krjm8JTtN-v-_EI319OGpJPIalqkTB44mfea1a7EGdQseoAhEtFX-U2OzuxPl_eeiVccpjKPxXOI-KtTQBaPSNW3zC_rpyn5yJFaxlXWxM2mbgpbEsRR10/s1600/1.jpeg" imageanchor="1"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoORx5BF7dEBaqdz_X6C8g3krjm8JTtN-v-_EI319OGpJPIalqkTB44mfea1a7EGdQseoAhEtFX-U2OzuxPl_eeiVccpjKPxXOI-KtTQBaPSNW3zC_rpyn5yJFaxlXWxM2mbgpbEsRR10/s320/1.jpeg" width="320" /></a><br />
<br />
La schermata successiva permette la selezione del file immagine. In questo caso sto selezionato il lato B del disco di sistema, dov'è contenuto il CP/M:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL3jUHFKJnIYw1wpnXkPO1HWZh9uHoNss1Fhp-Utd7yC67yrF1r0jn1XFOKh5IfTYpMRoTu6XgoDWmyhkR56bmLweD1ESzdr0LuvnxHtpQa2HDZOPFXMyM5O6J3TjFk5-5oFTbkqb2hFw/s1600/2.jpeg" imageanchor="1"><img border="0" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL3jUHFKJnIYw1wpnXkPO1HWZh9uHoNss1Fhp-Utd7yC67yrF1r0jn1XFOKh5IfTYpMRoTu6XgoDWmyhkR56bmLweD1ESzdr0LuvnxHtpQa2HDZOPFXMyM5O6J3TjFk5-5oFTbkqb2hFw/s640/2.jpeg" width="640" /></a><br />
<br />
Si seleziona OK e quindi CONTINUE:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgArllZJpuEUC8u88qm-m_EAT_8CKlGvzHuEOJdHDVGN5Ed1sbOPXtNEuvGGce3G5yugHoN-XxOVYK1EMUzqS72bXtcurHgeWTeBL_5iP3-tufC2x2iZV8-p6zhH1vmxZb0d-5wh5RIatM/s1600/3.jpeg" imageanchor="1"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgArllZJpuEUC8u88qm-m_EAT_8CKlGvzHuEOJdHDVGN5Ed1sbOPXtNEuvGGce3G5yugHoN-XxOVYK1EMUzqS72bXtcurHgeWTeBL_5iP3-tufC2x2iZV8-p6zhH1vmxZb0d-5wh5RIatM/s400/3.jpeg" width="400" /></a><br />
<br />
Ora Joyce ci chiede di dare un nome all'immagine. Io ho scritto 'cpm_plus':<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh64UHSSDKt7Qi7jDUIIOCXf3OuNFXjBaEboo2rCblFS1iEyFUGEimrOYJcMN5LZ_5fGEZonAojVOoXTvzjD9ArrtGBtGSB3VlY6U2PC0BBEYNuXdlM1Jw7ZDQkYEMptJZ7KWaUD1uY6zQ/s1600/4.jpeg" imageanchor="1"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh64UHSSDKt7Qi7jDUIIOCXf3OuNFXjBaEboo2rCblFS1iEyFUGEimrOYJcMN5LZ_5fGEZonAojVOoXTvzjD9ArrtGBtGSB3VlY6U2PC0BBEYNuXdlM1Jw7ZDQkYEMptJZ7KWaUD1uY6zQ/s320/4.jpeg" width="320" /></a><br />
<br />
<span style="font-family: inherit;"><span style="-webkit-text-stroke-color: rgb(0, 255, 0); -webkit-text-stroke-width: initial;">A questo punto appare la schermata principale, che è quella che verrà presentata ogni volta che si avvia Joyce:</span></span><br />
<span style="font-family: inherit;"><span style="-webkit-text-stroke-color: rgb(0, 255, 0); -webkit-text-stroke-width: initial;"><br /></span></span>
<span style="font-family: inherit;"><span style="-webkit-text-stroke-color: rgb(0, 255, 0); -webkit-text-stroke-width: initial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2s6PR5SYk2Z4J0JurDkg5SLddvntGK30X_k2dQ1tecdtN17nnPfRWhTFqOpAxIJFc2GzilFd3xxJBC0bXodvMHdYu95zx7RL1JG95-c5Bh4p2-FR5zcXMF2g-Vvkk6Qfmbm5UDm9bqOw/s1600/5.jpeg" imageanchor="1"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2s6PR5SYk2Z4J0JurDkg5SLddvntGK30X_k2dQ1tecdtN17nnPfRWhTFqOpAxIJFc2GzilFd3xxJBC0bXodvMHdYu95zx7RL1JG95-c5Bh4p2-FR5zcXMF2g-Vvkk6Qfmbm5UDm9bqOw/s640/5.jpeg" width="640" /></a></span></span><br />
<span style="font-family: inherit;"><span style="-webkit-text-stroke-color: rgb(0, 255, 0); -webkit-text-stroke-width: initial;"><br /></span></span>
<span style="font-family: inherit;"><span style="-webkit-text-stroke-color: rgb(0, 255, 0); -webkit-text-stroke-width: initial;">E' stata specificata una sola immagine, quella denominata "cpm_plus" ed identificata con "1". L'"1" è il tasto da premere se si vuole avviare dal disco "cpm_plus".</span></span><br />
Prima di iniziare il boot occorre specificare il tipo di hardware da emulare. Come detto questa patch è specifica per PCW 8256/8512, quindi si procederà come segue. Premere F9, quindi F6 e selezionare con i tasti freccia la voce "General":<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKYFEdcT7qB7McpTnKHyP-EzK7bpn5QfZ41F5oa-PePruZyJ-Zs6JmR_VcjDef4rGfhdpgAAjJgo4AkJqKHIAk00_FN5LCfBqixiaajYy2CVVLLhUnL0YDPBXYt2xzdWO9qEd87Za6XjQ/s1600/6.jpeg" imageanchor="1"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKYFEdcT7qB7McpTnKHyP-EzK7bpn5QfZ41F5oa-PePruZyJ-Zs6JmR_VcjDef4rGfhdpgAAjJgo4AkJqKHIAk00_FN5LCfBqixiaajYy2CVVLLhUnL0YDPBXYt2xzdWO9qEd87Za6XjQ/s640/6.jpeg" width="640" /></a><br />
<br />
Premere Invio e selezionare 8256/8512:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga4qmJSvILlkBvbmHji57VuAEnJwAfLp_eDDJaBG5PT7FQNbQK-y7y9YOfkI0oTxpYM7tn6a3q8sWQIHaTqXs40kyCGFReCozmIE3uneFUGEG3DnVRuwfs7MA4s3uDLVxDofTF8ndjjO8/s1600/7.jpeg" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga4qmJSvILlkBvbmHji57VuAEnJwAfLp_eDDJaBG5PT7FQNbQK-y7y9YOfkI0oTxpYM7tn6a3q8sWQIHaTqXs40kyCGFReCozmIE3uneFUGEG3DnVRuwfs7MA4s3uDLVxDofTF8ndjjO8/s320/7.jpeg" width="255" /></a><br />
<br />
Selezionare EXIT e quindi "Save Settings":<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB3iXmBb2E6cQ__Kz9pS6yO9f3twTHb8gIU5DiFCqIZoBXUlSpWJzgz7blyY470Dx12VMlHpAe_fyyKeC4VVQ3QhiRR_-D_RXtRxQGM1H1IMfK4mQsaEz_r3hfOshU1LbbhUnyPM4O7DA/s1600/9.jpeg" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB3iXmBb2E6cQ__Kz9pS6yO9f3twTHb8gIU5DiFCqIZoBXUlSpWJzgz7blyY470Dx12VMlHpAe_fyyKeC4VVQ3QhiRR_-D_RXtRxQGM1H1IMfK4mQsaEz_r3hfOshU1LbbhUnyPM4O7DA/s320/9.jpeg" width="260" /></a><br />
<br />
<br />
Uscire da tutte le schermate con Exit o con il tasto ESC. Adesso premendo "1" si effettuerà il boot ed il sistema sarà pronto per l'utilizzo:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjmtH4ZvfLQwIEOBsRpwSmcuQ0TNPNcQaaa8rbb1ocIOarMjUBevNKKGmhg8nSsBBeE4YBHtLPHc4ioiEe7FlZai5ll3BoE8rBY5aa451d7UMbpdyy6JzooaxCYASZvF1y4VULJQ6c5k8/s1600/11.jpeg" imageanchor="1"><img border="0" height="502" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjmtH4ZvfLQwIEOBsRpwSmcuQ0TNPNcQaaa8rbb1ocIOarMjUBevNKKGmhg8nSsBBeE4YBHtLPHc4ioiEe7FlZai5ll3BoE8rBY5aa451d7UMbpdyy6JzooaxCYASZvF1y4VULJQ6c5k8/s640/11.jpeg" width="640" /></a><br />
<br />
<span style="text-align: justify;"><br /></span>
<br />
<div style="text-align: justify;">
Per concludere ecco una breve spiegazione delle modifiche che ho apportato al codice sorgente di Joyce. La classe C++ che gestisce la tastiera è chiamata <span style="font-family: "courier new" , "courier" , monospace;">JoycePcwKeyboard</span>, ed è dichiarata e definita nei file JoycePcwKeyboard.hxx e JoycePcwKeyboard.cxx, entrambi posizionati nella cartella "bin".</div>
<div style="text-align: justify;">
Nella dichiarazione della classe ho aggiunto il campo <span style="font-family: "courier new" , "courier" , monospace;">m_fdvAlt</span> che è un flag attivo per tutto il tempo in cui il tasto ALT è premuto. Ho dichiarato anche due metodi, il primo è <span style="font-family: "courier new" , "courier" , monospace;">fdv_handle()</span> che è il gestore della tastiera alternativo a Joyce e <span style="font-family: "courier new" , "courier" , monospace;">fdv_setKeyMap()</span> che ne è di supporto:</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"> bool m_fdvAlt;</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> void fdv_setKeyMap(Uint8 addr, Uint8 bit, bool down);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> bool fdv_handle(SDLKey keysym, Uint8 type);</span><br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">fdv_handle()</span><span style="font-family: inherit;"> intercetta solo le configurazioni di tasti (che chiamerò regole) specificati nell'array </span><span style="font-family: "courier new" , "courier" , monospace;">fdv_KMAPEX[]</span>, definito in JoycePcwKeyboard.cxx. Questo array è composto da una struttura di 11 campi: il primo (<span style="font-family: "courier new" , "courier" , monospace;">keysym</span>) specifica il codice SDL del tasto premuto, mentre i campi <span style="font-family: "courier new" , "courier" , monospace;">shift</span> e <span style="font-family: "courier new" , "courier" , monospace;">alt</span> indicano se SHIFT e/o ALT debbano essere attivi affinché la regola venga applicata.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In alcuni casi è necessario disattivare SHIFT o ALT perché il tasto corrispondente sul PCW non li richiede mentre era necessario sul PC. E' il caso dell'uguale (=) che sul macbook si fa con SHIFT + '0', mentre sul PCW c'è un tasto dedicato. Per questo si utilizzano i campi <span style="font-family: "courier new" , "courier" , monospace;">off_addr_swAlt/off_bit_swAlt</span> (quando l'opzione scambia EXTRA<->ALT è attiva) oppure <span style="font-family: "courier new" , "courier" , monospace;">off_addr_nswAlt/off_bit_nswAlt</span> (quando l'opzione scambia EXTRA<->ALT è disattiva). I campi <span style="font-family: "courier new" , "courier" , monospace;">*_addr_*</span> contengono il primo nibble (primi quattro bit) dell'indirizzo memory mapped della tastiera, mentre i campi <span style="font-family: "courier new" , "courier" , monospace;">*_bit_*</span> il numero del bit relativo al tasto, secondo questa tabella:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcmn_meb-8NdPtoocWjmBu7l4g4Udq6qE_vqaz0ARa_1yR7F6pAP5fpi7jT49B7Hj4n_NSJ8SQ9pZLeaMort0r7GRnWc7VvNrlQslNxVCdcd42YO-UgodUGezjn2YWHDFqKiIzhcKMepw/s1600/1.png" imageanchor="1"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcmn_meb-8NdPtoocWjmBu7l4g4Udq6qE_vqaz0ARa_1yR7F6pAP5fpi7jT49B7Hj4n_NSJ8SQ9pZLeaMort0r7GRnWc7VvNrlQslNxVCdcd42YO-UgodUGezjn2YWHDFqKiIzhcKMepw/s640/1.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ad esempio, per disattivare lo SHIFT occorre impostare <span style="font-family: "courier new" , "courier" , monospace;">off_addr_swAlt = 2 </span><span style="font-family: inherit;">(indirizzo 3FF<u><b>2</b></u>h) e </span><span style="font-family: "courier new" , "courier" , monospace;">off_bit_swAlt = 5</span><span style="font-family: inherit;"> (bit <b><u>5</u></b>).</span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;">I campi </span><span style="font-family: "courier new" , "courier" , monospace;">on_addr_1/on_bit_1</span> e <span style="font-family: "courier new" , "courier" , monospace;">on_addr_2/on_bit_2</span> specificano l'azione da intraprendere, cioè i tasti che il PCW vedrà premuti.</div>
<div style="text-align: justify;">
La regola da impostare per generare l'uguale è quindi questa:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">{SDLK_0, true, false, // tasto SDLK_0 e SHIFT premuto (ALT no)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 0x02, 0x05, // SHIFT su (nel caso ALT-EXTRA scambiati)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 0x02, 0x05, // SHIFT su (ALT-EXTRA non scambiati)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 0x03, 0x00, // '=' giù</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> 0xFF, 0xFF}, // 0xFF indica "campi non utilizzati"</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il metodo <span style="font-family: "courier new" , "courier" , monospace;">fdv_handle()</span>, oltre ad applicare le regole specificate nell'array <span style="font-family: "courier new" , "courier" , monospace;">fdv_KMAPEX[]</span>, si occupa anche di rilevare la pressione del tasto ALT (per impostare il flag <span style="font-family: "courier new" , "courier" , monospace;">m_fdvAlt</span>) e sistemare un problema con il tasto CAPSLOCK.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Questa è la dichiarazione della struttura <span style="font-family: "courier new" , "courier" , monospace;">fdv_KMAPEX_t</span>, utilizzata nell'array <span style="font-family: "courier new" , "courier" , monospace;">fdv_KMAPEX[]</span>:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">struct fdv_KMAPEX_t {</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> // PC side state</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> SDLKey keysym;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> bool shift;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> bool alt;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> // PCW side: switch off if m_swapAlt == true</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 off_addr_swAlt; // 0xFF nothing to switch off</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 off_bit_swAlt; // 0xFF nothing to switch off</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> // PCW side: switch off if m_swapAlt == false</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 off_addr_nswAlt; // 0xFF nothing to switch off</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 off_bit_nswAlt; // 0xFF nothing to switch off</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> // PCW side: switch on</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 on_addr_1; // 0xFF nothing to switch on</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 on_bit_1; // 0xFF nothing to switch on</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 on_addr_2; // 0xFF nothing to switch on</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"> Uint8 on_bit_2; // 0xFF nothing to switch on</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">};</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Queste sono le regole:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">static const fdv_KMAPEX_t fdv_KMAPEX[] = {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // ':' MAC-IT: SHIFT + '.' PCW: SHIFT + ';'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_PERIOD, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x05}, // ';' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // ';' MAC-IT: SHIFT + ',' PCW: ';'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_COMMA, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x05, // ';' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '\' MAC-IT: '\' PCW: EXTRA + '1/2'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_BACKSLASH, false, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x1, // EXTRA down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x6}, // '1/2' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '|' MAC-IT: SHIFT + '\' PCW: EXTRA + '.'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_BACKSLASH, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x07}, // '.' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '&' MAC-IT: SHIFT + '6' PCW: SHIFT + '7'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_6, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x05, 0x01}, // '7' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '/' MAC-IT: SHIFT + '7' PCW: '/'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_7, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x06, // '/' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '(' MAC-IT: SHIFT + '8' PCW: SHIFT + '9'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_8, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x04, 0x01}, // '9' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // ')' MAC-IT: SHIFT + '9' PCW: SHIFT + '0'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_9, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x04, 0x00}, // '0' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '=' MAC-IT: SHIFT + '0' PCW: '='</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_0, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x00, // '=' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // ''' MAC-IT: ''' PCW: SHIFT + '6'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_QUOTE, false, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x06, 0x00}, // '6' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '?' MAC-IT: SHIFT + ''' PCW: SHIFT + '/'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_QUOTE, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x06}, // '/' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '^' MAC-IT: SHIFT + 'ì' PCW: EXTRA + '7'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA0, true, false, // In my system 'ì' is 0xA0</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x05, 0x01}, // '7' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '[' MAC-IT: ALT + 'è' PCW: '['</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA1, false, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x02, // '['</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // ']' MAC-IT: ALT + '+' PCW: ']'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_PLUS, false, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x01, // ']'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '+' MAC-IT: '+' PCW: SHIFT + '='</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_PLUS, false, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x00}, // '=' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '*' MAC-IT: SHIFT + '+' PCW: SHIFT + '8'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_PLUS, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x05, 0x00}, // '8' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '@' MAC-IT: ALT + 'ò' PCW: SHIFT + '1/2'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA3, false, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x6}, // '1/2' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '#' MAC-IT: ALT + 'à' PCW: '#'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA2, false, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x03, // '#' down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF}, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '{' MAC-IT: SHIFT + ALT + 'è' PCW: SHIFT + '['</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA1, true, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x02}, // '['</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '{' MAC-IT: SHIFT + ALT + '+' PCW: SHIFT + '['</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_PLUS, true, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x01}, // ']'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '°' MAC-IT: SHIFT + 'à' PCW: EXTRA + '5'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {(SDLKey)0xA2, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x06, 0x01}, // '5'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '~' MAC-IT: ALT + '5' PCW: EXTRA + '-'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_5, false, true,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA up (EXTRA<->ALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x07, // ALT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x0A, 0x01, // EXTRA down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x01}, // '-'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '<' MAC-IT: '<' PCW: SHIFT + '§'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_LESS, false, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0xFF, 0xFF, //</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x03, 0x04}, // '§'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // '>' MAC-IT: SHIFT + '<' PCW: SHIFT + '#'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {SDLK_LESS, true, false,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT up</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x05, // SHIFT down</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> 0x02, 0x03}, // '#'</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">};</span></div>
<div>
<br /></div>
<div>
<div>
Ecco i due metodi <span style="font-family: "courier new" , "courier" , monospace;">fdv_setKeyMap()</span> (di supporto) e <span style="font-family: "courier new" , "courier" , monospace;">fdv_handle()</span> (il gestore vero e proprio):</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">void JoycePcwKeyboard::fdv_setKeyMap(Uint8 addr, Uint8 bit, bool down)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">{</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (down)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_pcwKeyMap[addr] |= 1 << bit;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> else</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_pcwKeyMap[addr] &= ~(1 << bit);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">bool JoycePcwKeyboard::fdv_handle(SDLKey keysym, Uint8 type)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">{</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (type == SDL_KEYDOWN || type == SDL_KEYUP)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // semi-handle ALT</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (keysym == SDLK_LALT || keysym == SDLK_RALT)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_fdvAlt = type == SDL_KEYDOWN;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> return false; // not handled</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // handle CAPSLOCK</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (keysym == (SDLKey)0x12D)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_shiftLock = type == SDL_KEYDOWN;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> return true; // handled</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> for (int i = 0; i < sizeof(fdv_KMAPEX) / sizeof(fdv_KMAPEX_t); ++i)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (fdv_KMAPEX[i].keysym == keysym && fdv_KMAPEX[i].shift == m_trueShift && fdv_KMAPEX[i].alt == m_fdvAlt)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // switch off (if m_swapAlt == true)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (m_swapAlt && fdv_KMAPEX[i].off_addr_swAlt != 0xFF)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> fdv_setKeyMap(fdv_KMAPEX[i].off_addr_swAlt, fdv_KMAPEX[i].off_bit_swAlt, type != SDL_KEYDOWN);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // switch off (if m_swapAlt == false)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (!m_swapAlt && fdv_KMAPEX[i].off_addr_nswAlt != 0xFF)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> fdv_setKeyMap(fdv_KMAPEX[i].off_addr_nswAlt, fdv_KMAPEX[i].off_bit_nswAlt, type != SDL_KEYDOWN);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> // switch on (down)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (fdv_KMAPEX[i].on_addr_1 != 0xFF)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> fdv_setKeyMap(fdv_KMAPEX[i].on_addr_1, fdv_KMAPEX[i].on_bit_1, type == SDL_KEYDOWN);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (fdv_KMAPEX[i].on_addr_2 != 0xFF)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> fdv_setKeyMap(fdv_KMAPEX[i].on_addr_2, fdv_KMAPEX[i].on_bit_2, type == SDL_KEYDOWN);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_keyPress = true;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> return true;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> return false; // not handled</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span></div>
</div>
</div>
<div>
<br /></div>
</div>
<div style="text-align: justify;">
La chiamata a <span style="font-family: "courier new" , "courier" , monospace;">fdv_handle()</span> viene effettuata all'interno di <span style="font-family: "courier new" , "courier" , monospace;">handleEvent()</span><span style="font-family: inherit;">, per cui va modificato così:</span></div>
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">int JoycePcwKeyboard::handleEvent(SDL_Event &e)</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">{</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">...</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (keysym == SDLK_LSHIFT || keysym == SDLK_RSHIFT) </span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> m_trueShift = b;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if (fdv_handle(keysym, e.type))</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> return 1;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">...</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span><br />
<br />
<br />
<br />
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;"><br /></span>
<span style="text-align: justify;"><br /></span>Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com0tag:blogger.com,1999:blog-2272389858875684243.post-68841705825022368972018-04-07T07:25:00.000-07:002018-06-06T09:32:10.523-07:00Retro-restoring Amstrad PCW 8512<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5HccF89ZP0x_3kBClZVBT9Oz56nTx3SSdqRpdR7YK2xpcro2A8Uw977b-ONbAGF3X5eadjI4RoiFOmhk3f3tzuzRBNWMUpYjLEUGC4rnkI-NLPxbSMv_J5f2WvDZlCfJOZDROPJwE8R0/s1600/IMG_2853.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5HccF89ZP0x_3kBClZVBT9Oz56nTx3SSdqRpdR7YK2xpcro2A8Uw977b-ONbAGF3X5eadjI4RoiFOmhk3f3tzuzRBNWMUpYjLEUGC4rnkI-NLPxbSMv_J5f2WvDZlCfJOZDROPJwE8R0/s1600/IMG_2853.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5HccF89ZP0x_3kBClZVBT9Oz56nTx3SSdqRpdR7YK2xpcro2A8Uw977b-ONbAGF3X5eadjI4RoiFOmhk3f3tzuzRBNWMUpYjLEUGC4rnkI-NLPxbSMv_J5f2WvDZlCfJOZDROPJwE8R0/s200/IMG_2853.jpeg" width="200" /></a><br />
<br />
<br />
Il PCW 8512 (e il suo fratello minore 8256) è un computer ad 8 bit prodotto dalla Amstrad a partire dal 1985. Concepito principalmente come sistema di video-scrittura, poteva essere utilizzato anche come un computer general purpose basato sul sistema operativo CP/M.<br />
<br />
<br />
<br />
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>La CPU</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il microprocessore utilizzato è il famoso Zilog Z80 con clock a 4MHz, mentre la RAM è di 512K. La cosa interessante di questo sistema è che è sprovvisto di ROM, per cui il sistema operativo ed il BIOS vengono caricati dal disco. All'avvio il controller della stampante invia delle istruzioni alla CPU che non fanno altro che scrivere dall'indirizzo 0x0000 il vero codice di bootstrap. Quest'ultimo a suo volta caricherà dal disco A il bootstrap del sistema operativo.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Lo Storage</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il sistema ha due dischi da 3'' (non 3.5''!!) che è lo stesso formato usato dal CPC 6128 e dal<span style="font-family: inherit;"> <span style="background-color: white; text-align: start;">Sinclair Spectrum +3</span>. Il drive A è a singola densità e singola faccia, per cui, con 40 tracce da 9 settori di 512 byte, ha una capacità di 180K. Il drive B è a doppia densità e doppia faccia (40 cilindri da 18</span> settori) quindi può contenere 720K.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Il Video</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il monitor è monocromatico a fosfori verdi e può visualizzare 720x256 pixels, corrispondenti a 90 colonne per 32 righe in modalità testo. In realtà non c'è una modalità testo, la memoria video è completamente bitmapped. In questo modo uno scrolling fluido sarebbe difficile da ottenere con il solo Z80, per questo ogni riga dello schermo viene indirizzata singolarmente da un'area di 256 puntatori (denominata Roller-RAM). Cambiando i puntatori si cambia anche l'ordine delle righe visualizzate, rendendo lo scrolling istantaneo. Purtroppo questa versatilità si paga con la necessità di un codice più complesso quando si fa grafica anziché semplice testo.</div>
<div style="text-align: justify;">
I codici di controllo dello schermo sono quasi completamente compatibili con lo Zenith Z19/Z29, come il terminale VT52, mentre per la stampante sono compatibili con la Seikosha SP-800.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>L'Audio</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
L'audio si limita ad un semplice beep proveniente da un buzzer interno, con frequenza e volume fissi.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Il Chipset</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Lo Z80 viene affiancato da un chip ASIC che controlla la maggior parte delle funzioni, tra cui il refresh della RAM dinamica, la decodifica degli indirizzi ed il video. I disk drive vengono gestiti da un NEC µPD765A, che pur potendo controllare quattro dischi a doppia faccia e doppia densità viene invece utilizzato limitatamente a come descritto sopra.</div>
<div style="text-align: justify;">
E' incluso inoltre un controller per la stampante (atipico, in quanto questo controller dovrebbe stare nell'hardware della stampante stessa) che è un NEC µPD8041. Questo è in realtà una piccola MCU dotata di 64 byte di RAM e 1K di ROM. Come detto la funzione di questa MCU non è solo di controllare l'hardware della stampante, ma soprattuto quello di "iniettare" del codice nel bus dati affinché lo Z80 scriva a sua volta il codice di boot nella RAM.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>La Memoria</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
La RAM è divisa in 32 banchi da 16K. Dato che lo Z80 può indirizzare al massimo 64K soltanto quattro banchi sono contemporaneamente visibili dalla CPU. La Roller-RAM ed il video frame buffer possono essere allocati in qualsiasi posizione purché situata nei primi 8 banchi.</div>
<div style="text-align: justify;">
Il PCW 8256 è espandibile a 512K aggiungendo 8 chip di tipo 41256 nei socket liberi e cambiando alcuni dip-switch sulla motherboard.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Le Porte</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Sul retro ci sono due porte, una dedicata alla stampante ed una di espansione. In quest'ultima sono presenti il bus indirizzi, il bus dati, i segnali di controllo, il clock della CPU, il segnale di reset e due segnali utilizzabili, con un circuito adattatore, come uscita video ausiliaria.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Il Sistema Operativo</b></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il PCW può utilizzare la versione 3 di CP/M, denominata CP/M Plus, che è anche l'ultima rilasciata dalla Digital Research per i sistemi ad 8 bit. Questa versione ha il vantaggio, rispetto alle precedenti, di supportare il bank switching, il che consente di avere molta più memoria libera per le applicazioni (TPA, Transient Program Area): nel caso del PCW il TPA è di 61K.</div>
<div style="text-align: justify;">
Non tutti i 512K vengono utilizzati dal S.O. e come TPA: oltre alla memoria video, una parte è riservata per mantenere residente il CCP (la shell), mentre il restante è dedicato alla Ram Disk, accessibile come drive M. Nell'8512 la dimensione della Ram Disk è di 368K.</div>
<div style="text-align: justify;">
C'è inoltre il supporto per GSX (Graphics System Extension) che fornisce un insieme di primitive grafiche standardizzate per i programmi CP/M che utilizzano la grafica.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<b>Il Restauro</b></div>
</div>
<br />
<div style="text-align: justify;">
Ho acquistato su ebay un 8512 per 30 GPB con la sezione di alimentazione completamente guasta. Ho così deciso di rimuoverne i componenti e sulla parte libera alloggiare una nuova PSU.<br />
Internamente il PCW è composto da tre parti principali: la Power Board, che fornisce l'alimentazione e controlla lo schermo, lo schermo CRT e la motherboard, dov'è lo Z80 e il chipset.</div>
<div style="text-align: justify;">
Questo è lo schema della Power Board: l'area rossa è quella relativa all'alimentazione (12V per il monitor e per i drive, 5V per il buffer del segnale video e per la motherboard e i 24V per la stampante esterna), di cui ho rimosso i componenti, quello che rimane gestisce il tubo catodico.<br />
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbLJC2SKQaZ2XYTwFh0BEK5jhHrB345Po8fJtmt2lZmk5-IFygXWyAs6c5DAeVYCLvqsNpfAGmPKWAxzUHxFFx96atR3qnP7J6TRYF8H9fAUPHECpl10RZXGGoHSeYPK2e6dTIsgnl8w/s1600/1.png" imageanchor="1"><img border="0" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbLJC2SKQaZ2XYTwFh0BEK5jhHrB345Po8fJtmt2lZmk5-IFygXWyAs6c5DAeVYCLvqsNpfAGmPKWAxzUHxFFx96atR3qnP7J6TRYF8H9fAUPHECpl10RZXGGoHSeYPK2e6dTIsgnl8w/s400/1.png" width="400" /></a><br />
<br /></div>
<div style="text-align: justify;">
Questa è la Power Board dopo la rimozione dei componenti. Rimane solo la sezione video:<br />
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIs5XzKsWkx3xb5NYPgkDhYqKA8EenpsR2f5ztXRcd4jHyxy6WeN0BHYG8IvYodR7gb2wNk9Q0gIxttUgLxYi6fg1oTUzS-vOVU25BxL8pO_CpIPgKUMVcwq0X3q937i8uV_l5PM9DSms/s1600/IMG_2642.JPG" imageanchor="1"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIs5XzKsWkx3xb5NYPgkDhYqKA8EenpsR2f5ztXRcd4jHyxy6WeN0BHYG8IvYodR7gb2wNk9Q0gIxttUgLxYi6fg1oTUzS-vOVU25BxL8pO_CpIPgKUMVcwq0X3q937i8uV_l5PM9DSms/s400/IMG_2642.JPG" width="400" /></a></div>
<div style="text-align: justify;">
<br />
Il modello che ho ricevuto aveva anche un altro problema: un fastidioso fischio proveniente nella sezione ad alta tensione. Ho sostituito il trasformatore di riga (Flyback Transformer) e tutti i condensatori vicini: in questo modo il fischio è completamente sparito. L'unica difficoltà è stato trovare un flyback compatibile. Io l'ho recuperato da un monitor Amstrad MM12, che monta praticamente gli stessi componenti.</div>
<div style="text-align: justify;">
<br />
Ho quindi installato un SMPS (Switched Mode Power Supply) da 12V - 3A (un semplice alimentatore per notebook, il blocco di destra), e di seguito un modulo basato su HRD05003 per i 5V (quello più piccolo a sinistra):</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjANRw_KOmJ-Erdxz1mOKKlr6FDAArgOaYGe96SI_E8dwsNdnrMynPXbPcBNVNtH9xJ1zB4VjqVD8v1Hi4AZtMYeLCx4IPd9sAlpRIfCpjXZKa37RZEDxGnDO009VvhbgGjDsuyHiFLZbM/s1600/IMG_2850.jpg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjANRw_KOmJ-Erdxz1mOKKlr6FDAArgOaYGe96SI_E8dwsNdnrMynPXbPcBNVNtH9xJ1zB4VjqVD8v1Hi4AZtMYeLCx4IPd9sAlpRIfCpjXZKa37RZEDxGnDO009VvhbgGjDsuyHiFLZbM/s320/IMG_2850.jpg" width="320" /></a></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ho rimosso i due dischi da 3'' per sostituirli con due emulatori di floppy drive Gotek, con firmware alternativo (<a href="https://github.com/keirf/FlashFloppy">FlashFloppy</a>). Bisogna fare attenzione all'alimentazione, che è invertita rispetto allo standard PC (12V <-> 5V), per cui bisogna costruire un adattatore:<br />
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigikYmY5kllWD4Jb72U9FqvuvmU73rR96HYaAMFNg7e2m3wfmUHTaWjEavhgV1n83HuvfFr3YA3z8-Vuwqlhlt8-f4d6qyNWGfhLemgjQ9CMbfLucYr0VMeSeazejga2-CrheMbsP4G8Y/s1600/1.jpg" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigikYmY5kllWD4Jb72U9FqvuvmU73rR96HYaAMFNg7e2m3wfmUHTaWjEavhgV1n83HuvfFr3YA3z8-Vuwqlhlt8-f4d6qyNWGfhLemgjQ9CMbfLucYr0VMeSeazejga2-CrheMbsP4G8Y/s320/1.jpg" width="264" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ovviamente occorre un adattatore anche per i segnali dati del drive, che da 26 pin andranno adattati a 34. La corrispondenza è questa:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: inherit;">Per il Gotek:</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Segnale PCW-26 Gotek (Shugart-34)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">GND 1 1</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">IDX 2 8</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DS1 4 10 (DS1 - gotek impostato su S0)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DS2 6 12 (DS2 - gotek impostato su S1)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">MOT 8 16</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DIR 10 18</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">STP 12 20</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WD 14 22</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WG 16 24</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">TK0 18 26</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WP 20 28</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">RD 22 30</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">SS 24 32</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">READY 26 34</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
Per un normale floppy drive PC, solo per il drive A (un 3.5'' per PC risponde sempre come secondo disco):</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Segnale PCW-26 DRIVE (PC-34)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">GND 1 1</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">IDX 2 8</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DS1 4 12</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DS2 6 ...altrimenti il 12 va qui per drive B</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">MOT 8 16</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">DIR 10 18</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">STP 12 20</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WD 14 22</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WG 16 24</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">TK0 18 26</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">WP 20 28</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">RD 22 30</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">SS 24 32</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">READY 26 1 (ready non disponibile!)</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4RtUEJ8l-DYEIYjWdY2IhyphenhyphennsEHEPI0zkWTBNths0rsF4ecZRRJk0aikHHjxjdnn4v2T8Vlw-_O_B4_qWamSA3f_ctCpy2gWglYM48E6hcPaOlyY5s3G5a9oPn07r5uCwGQoBbk7XG06g/s1600/1.jpg" imageanchor="1"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4RtUEJ8l-DYEIYjWdY2IhyphenhyphennsEHEPI0zkWTBNths0rsF4ecZRRJk0aikHHjxjdnn4v2T8Vlw-_O_B4_qWamSA3f_ctCpy2gWglYM48E6hcPaOlyY5s3G5a9oPn07r5uCwGQoBbk7XG06g/s320/1.jpg" width="320" /></a></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Dai Gotek ho rimosso il contenitore per sostituirlo con uno progettato appositamente e stampato in 3D (potete trovarlo sul mio profilo <a href="https://www.thingiverse.com/thing:2850367">thingverse</a>), così che si vada ad inserire e fissare perfettamente nell'alloggiamento dei dischi da 3''. E' stato anche sostituito il display con uno OLED, così da visualizzare i nomi delle immagini:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH7dQaMxP2ByyfR-5WoFWzeMHOrCkWoScHyhu8bdlBZohZgn5E1Ypt43LOXEmYvQmjhUL5Fwjfx-owN7Qj9VfrlWv9TKt4LBCkhbjilOviTiELHecElkGNDdoxlUO3N0V_grAzsjxZKKw/s1600/IMG_2789.JPG" imageanchor="1"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH7dQaMxP2ByyfR-5WoFWzeMHOrCkWoScHyhu8bdlBZohZgn5E1Ypt43LOXEmYvQmjhUL5Fwjfx-owN7Qj9VfrlWv9TKt4LBCkhbjilOviTiELHecElkGNDdoxlUO3N0V_grAzsjxZKKw/s400/IMG_2789.JPG" width="300" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
Il Gotek montato sull'adattatore:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjON3wLcD3RGE1OZxZ7HmqpBrunfKVm1Y0OIekGsUFnsmDDsTGIheL_ivDhIVX197CrnvLvTwElrwU9zVbN2FsSqVyZAEShjtNigISmJGDQMDMJNdbHrVJEY2wSiCQkiktBb-lhDPie3II/s1600/1.jpg" imageanchor="1"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjON3wLcD3RGE1OZxZ7HmqpBrunfKVm1Y0OIekGsUFnsmDDsTGIheL_ivDhIVX197CrnvLvTwElrwU9zVbN2FsSqVyZAEShjtNigISmJGDQMDMJNdbHrVJEY2wSiCQkiktBb-lhDPie3II/s320/1.jpg" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
Il tutto installato al posto del drive A...</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHlYFyY-0ZA9GVZ3f1mr87QyR92wN9GY_pui193ZThix9V9ZtZqxdifnFAcNdlrKeuhYvMr_-Jjm3NjRHtTDwrgXysoVcwJbeKrgDRZd-549oVriDzjPp1ZtYcpwsbBSKdT0E-9m9bVTU/s1600/IMG_2792.JPG" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHlYFyY-0ZA9GVZ3f1mr87QyR92wN9GY_pui193ZThix9V9ZtZqxdifnFAcNdlrKeuhYvMr_-Jjm3NjRHtTDwrgXysoVcwJbeKrgDRZd-549oVriDzjPp1ZtYcpwsbBSKdT0E-9m9bVTU/s320/IMG_2792.JPG" width="240" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
....e quindi il B:<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEior4N8F1thJlblc1o1gPgYQRLyL4EYdQLirUPlTot59pieasyomtYKKvnc0DFtPnVFdNwJ9BomG73YZyu0qe38R4PgLrY2yZCLzSQFpIA4158-sO4Cfp_bA7BwBSWmcHJN_NmqbO3Nzv8/s1600/IMG_2852.jpeg" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEior4N8F1thJlblc1o1gPgYQRLyL4EYdQLirUPlTot59pieasyomtYKKvnc0DFtPnVFdNwJ9BomG73YZyu0qe38R4PgLrY2yZCLzSQFpIA4158-sO4Cfp_bA7BwBSWmcHJN_NmqbO3Nzv8/s320/IMG_2852.jpeg" width="240" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
Il risultato finale visto di fronte:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5DiOnr1OD2kK14NeLxvV2qgdVJM5j8INjhWcTgbsS0zRZoezNqRoxePj2cUEyg1MkC0WGVYNSK0zfJ68ABS-dyfmuHbD7brlmNwS0W09vejNNDD3NNfpNFBDj3u_Vg6B2qmphCabeEa4/s1600/IMG_2853.jpeg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5DiOnr1OD2kK14NeLxvV2qgdVJM5j8INjhWcTgbsS0zRZoezNqRoxePj2cUEyg1MkC0WGVYNSK0zfJ68ABS-dyfmuHbD7brlmNwS0W09vejNNDD3NNfpNFBDj3u_Vg6B2qmphCabeEa4/s320/IMG_2853.jpeg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<b>Il Software</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il PCW viene fornito di due dischi di sistema. Essendo a singola faccia, ogni lato è come se fosse un disco a sé da 180K. Questo è il contenuto:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Disco 1, lato A: <b>Locoscript</b></div>
<div style="text-align: justify;">
Disco 1, lato B: <b>CP/M Plus con Mallard Basic </b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Disco 2, lato A: <b>DR Logo & Help</b></div>
<div style="text-align: justify;">
Disco 2, lato B: <b>Programming Utilities</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Solo il disco 1 è di avvio, per cui inserendo il lato A (verso lo schermo) partirà il Word Processor Locoscript, mentre inserendo il lato B sarà avviato il CP/M.</div>
<div style="text-align: justify;">
Sul web si trovano le immagini dei dischi di sistema in formato .DSK, che è direttamente leggibile dal firmware alternativo FloppyFlash.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Con Linux (o OSX, ma non so se anche con Windows) ci sono dei tools per leggere o scrivere immagini DSK formattate per PCW, anche a livello di file. In questo modo si possono caricare tutti i software compatibili con CP/M, anche se non in formato immagine.</div>
<div style="text-align: justify;">
Questi tools si chiamano <span style="font-family: "courier new" , "courier" , monospace;">cpmtools</span> e vanno compilati con il supporto per la libreria <span style="font-family: "courier new" , "courier" , monospace;">libdsk</span><span style="font-family: inherit;">, per cui la prima cosa da fare è installare libdsk. Qui lo faccio tramite </span><span style="font-family: Courier New, Courier, monospace;">brew</span><span style="font-family: inherit;"> (<a href="https://brew.sh/index_it">https://brew.sh/index_it</a>):</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">brew install libdsk</span><br />
<br />
Installata libdsk si può scaricare (<a href="http://www.moria.de/~michael/cpmtools/">http://www.moria.de/~michael/cpmtools/</a>), configurare e installare i cpm tools:</div>
<div style="text-align: justify;">
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">./configure --with-libdsk</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">make install</span><br />
<br />
<div>
Il formato dei dischi da 180K è indicato con il parametro <span style="font-family: "courier new" , "courier" , monospace;">pcw</span>, mente per quelli da 720K è <span style="font-family: "courier new" , "courier" , monospace;">cf2dd</span>. Questi formati sono supportati nativamente dai <span style="font-family: "courier new" , "courier" , monospace;">cpmtools</span>, ma il tipo di immagine DSK è supportato solo compilandoli con il supporto per <span style="font-family: "courier new" , "courier" , monospace;">libdsk</span>, come visto sopra.</div>
<div>
<br /></div>
Adesso si possono usare i tools, per esempio questo visualizza il contenuto dell'immagine <span style="font-family: "courier new" , "courier" , monospace;">img.dsk</span>:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">cpmls -d -f pcw img.dsk</span> <span style="font-size: x-small;"><= per formato 180K (drive A del 8256 o 8512)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cpmls -d -f cf2dd img.dsk</span> <span style="font-size: x-small;"><= per formato 720K (drive A del 9512 o drive B del 8512)</span><br />
<div>
<br /></div>
<div>
Questo comando invece copia il file locale <span style="font-family: "courier new" , "courier" , monospace;">TEST.COM</span> nell'immagine dal 180K <span style="font-family: "courier new" , "courier" , monospace;">img.dsk</span>, come user 0 (gli users sono una sorta di cartelle e nel CP/M ce ne possono essere 16):</div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cpmcp -f pcw img.dsk TEST.com 0:</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: justify;">
Questi sono alcuni screenshot avviando il PCW con Locoscript (disco 1, lato A):</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiwDhI1E9hSmLI9Qo9r_82XiiiLpid6R4s2JDpcTEt71QZEnrZRHKhquWgPZ4_0j6vIGr0Cz4c75eYluBIuE1eWU2xyDcsAN9WgwSY3LYomJ_ers_Ns37yLuipi7WbKY_691EUMs9ZKk4/s1600/IMG_2859.jpeg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiwDhI1E9hSmLI9Qo9r_82XiiiLpid6R4s2JDpcTEt71QZEnrZRHKhquWgPZ4_0j6vIGr0Cz4c75eYluBIuE1eWU2xyDcsAN9WgwSY3LYomJ_ers_Ns37yLuipi7WbKY_691EUMs9ZKk4/s320/IMG_2859.jpeg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWKTjoQ6zo1u60-wRHNSWfuUOfGNHZ1SJmYVWdGFrw3sipx9_hY9mkch09N41Rhkq9bjZojtyRnVXiYJGekhsHY4hk4oen8h-lkvfJ0hMV_6BWyMzQo8P7Oio20SlG86qOvWnV4DFR_E/s1600/IMG_2860.jpeg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWKTjoQ6zo1u60-wRHNSWfuUOfGNHZ1SJmYVWdGFrw3sipx9_hY9mkch09N41Rhkq9bjZojtyRnVXiYJGekhsHY4hk4oen8h-lkvfJ0hMV_6BWyMzQo8P7Oio20SlG86qOvWnV4DFR_E/s320/IMG_2860.jpeg" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: justify;">
Questo invece è l'avvio da CP/M e l'esecuzione del Mallard Basic (Disco 1, lato B):<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqsUTAK0EbepRBHRv3uBzLNqoE0cd3AbitE1T4NkYD4-todFGTsWKGv9vMgqo9NkP9OP84-wakkFow92VL5bI0I7sw7L3wHZm7C38_bPDITxyv-fLkzURkBAcL5_T257WADakg2BR_blk/s1600/IMG_2855.jpeg" imageanchor="1"></a></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqsUTAK0EbepRBHRv3uBzLNqoE0cd3AbitE1T4NkYD4-todFGTsWKGv9vMgqo9NkP9OP84-wakkFow92VL5bI0I7sw7L3wHZm7C38_bPDITxyv-fLkzURkBAcL5_T257WADakg2BR_blk/s1600/IMG_2855.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqsUTAK0EbepRBHRv3uBzLNqoE0cd3AbitE1T4NkYD4-todFGTsWKGv9vMgqo9NkP9OP84-wakkFow92VL5bI0I7sw7L3wHZm7C38_bPDITxyv-fLkzURkBAcL5_T257WADakg2BR_blk/s320/IMG_2855.jpeg" width="320" /></a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1jqiBqx2jmOm4Gb8fXVe5Tp08XOA2X1Gwmqk7hr8dhugZKPqtFToBjb8ymfjhdh4Xi1mC7B_gqY2JgmuQQDQ7D9zCv_s6acU6vnNvrMqCi7Wk-JkwfntzW4ZjRRIu2nvfV-_Mb1Vndw/s1600/IMG_2861.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1jqiBqx2jmOm4Gb8fXVe5Tp08XOA2X1Gwmqk7hr8dhugZKPqtFToBjb8ymfjhdh4Xi1mC7B_gqY2JgmuQQDQ7D9zCv_s6acU6vnNvrMqCi7Wk-JkwfntzW4ZjRRIu2nvfV-_Mb1Vndw/s320/IMG_2861.jpeg" width="320" /></a></div>
<div style="text-align: left;">
</div>
<br />
<br />
<br />
Esiste infine anche un sistema operativo Open Source e ancora attivamente sviluppato, con finestre e multitasking, chiamato Symbos, compatibile anche con i CPC e gli MSX2. Queste sono alcune schermate:<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8UjT5nmtmfVw5HXLrHjb1xSV-Jssp7m-8EpUT8lIp_JDRXeShYcWiK7BO1z5MCYrByx-nBA2Rkp1ZK0R7c6_DfGAiFKsIqhSo0Q5tcsu-9WV0gvHB022yWQX-u7dU3brQOrkEjIxc_No/s1600/IMG_2863.jpeg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8UjT5nmtmfVw5HXLrHjb1xSV-Jssp7m-8EpUT8lIp_JDRXeShYcWiK7BO1z5MCYrByx-nBA2Rkp1ZK0R7c6_DfGAiFKsIqhSo0Q5tcsu-9WV0gvHB022yWQX-u7dU3brQOrkEjIxc_No/s320/IMG_2863.jpeg" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRr2kA7Ybm6keZTOkRaVjDfJvnceDZirOoSsmUlrnEHROAjui4Ny8TmJy1jXO2kLYTEkFOy18ZFC6PU61NuHkyvnmK278nDa7ukM2szs38KLVomeOMTpDwQ1EWOcifSK575libmen6eL8/s1600/IMG_2862.jpeg" imageanchor="1"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRr2kA7Ybm6keZTOkRaVjDfJvnceDZirOoSsmUlrnEHROAjui4Ny8TmJy1jXO2kLYTEkFOy18ZFC6PU61NuHkyvnmK278nDa7ukM2szs38KLVomeOMTpDwQ1EWOcifSK575libmen6eL8/s320/IMG_2862.jpeg" width="320" /></a></div>
<br />
<br />
<br />
<div style="text-align: center;">
<b>Riferimenti</b></div>
<br />
<div style="text-align: center;">
Il sito di <span style="font-family: inherit;">John Elliott, il "guru" del PCW e del CP/M</span></div>
<div style="text-align: center;">
<span style="font-family: inherit;"> </span><a href="http://seasip.info/">http://seasip.info</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Software PCW</div>
<div style="text-align: center;">
<a href="http://www.retroisle.com/amstrad/pcw/software.php">http://www.retroisle.com/amstrad/pcw/software.php</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Software CP/M</div>
<div style="text-align: center;">
<a href="http://pcsauro.altervista.org/CPM.PHP">http://pcsauro.altervista.org/CPM.PHP</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Sito "non-ufficiale" sul CP/M</div>
<div style="text-align: center;">
<a href="http://www.cpm.z80.de/">http://www.cpm.z80.de</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
FlashFloppy</div>
<div style="text-align: center;">
<a href="https://github.com/keirf/FlashFloppy">https://github.com/keirf/FlashFloppy</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Symbos</div>
<div style="text-align: center;">
<a href="http://www.symbos.de/">http://www.symbos.de</a></div>
<div style="text-align: center;">
<br /></div>
<br /></div>
<div style="text-align: justify;">
<br /></div>
<br />Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com8tag:blogger.com,1999:blog-2272389858875684243.post-74783773921171301042017-07-29T12:29:00.000-07:002017-07-29T12:56:34.347-07:00Valore minimo di una costante intera in PHP<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In PHP il minimo intero a 64 bit vale esattamente -9223372036854775808 (costante PHP_INT_MIN), che equivale a -2^63 o anche 1 << 63. La sua rappresentazione binaria è la seguente:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">1000000000000000000000000000000000000000000000000000000000000000</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
L'intero più grande è 9223372036854775807 (costante PHP_INT_MAX) equivalente a 2^63-1 o anche 1 << 63 - 1. Questa è la sua rappresentazione binaria:</div>
<div style="text-align: justify;">
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">0111111111111111111111111111111111111111111111111111111111111111</span><br />
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Detto questo, la seguente assegnazione dovrebbe create una variable di tipo <i>int</i>, pari al valore specificato:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">$x = -9223372036854775808;</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Invece $x sarà un <i>double</i>, anziché un <i>int</i>. Infatti il risultato di:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">var_dump($x);</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Sarà:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">double(-9.2233720368548E+18)</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
La costante intera assegnata a $x è stata convertita in <i>double</i>, perché?</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
La motivazione sta nel fatto che l'operatore unario "-" è applicato subito dopo che la costante intera è stata letta. Dato che la costante specificata è superiore al massimo intero (9223372036854775808 > 9223372036854775807) allora questa viene convertita subito in <i>double</i> e solo successivamente resa negativa dall'operatore "-". Il risultato dell'espressione resterà quindi un <i>double</i>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Lo stesso non succede specificando il minimo direttamente tramite la costante intera PHP_INT_MIN, in quanto questa è già negativa:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">$x = PHP_INT_MIN;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">var_dump($x);</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Risultato:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">int(-9223372036854775808)</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Non ci sono problemi neanche specificando il massimo intero in quanto questo rientra nel campo dei valori ammessi:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">$x = 9223372036854775807;</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">var_dump($x);</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Risultato:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">int(9223372036854775807)</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
A chi interessa tutto ciò? A me, perché mentre scrivevo un interprete PHP per un sistema embedded non capivo perché nel mio parser potevo specificare direttamente una costante con il minimo valore intero, mentre in Zend PHP no. Ora lo so, le costanti intere sono sempre positive!!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<br />Fabrizio Di Vittoriohttp://www.blogger.com/profile/00870939174727901335noreply@blogger.com2