Quito más archivos

This commit is contained in:
antoniovillena 2016-04-30 17:26:08 +02:00
parent 4876674a55
commit e6d6b6ebef
20 changed files with 35 additions and 35061 deletions

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<wave_config>
<wave_state>
</wave_state>
<db_ref_list>
<db_ref path="C:/Users/rodriguj/Documents/zxspectrum/zxuno/repositorio/cores/test11/tb_spi_isim_beh.wdb" id="1" type="auto">
<top_modules>
<top_module name="glbl" />
<top_module name="tb_spi" />
</top_modules>
</db_ref>
</db_ref_list>
<WVObjectSize size="10" />
<wvobject fp_name="/tb_spi/clk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk</obj_property>
<obj_property name="ObjectShortName">clk</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/dout" type="array" db_ref_id="1">
<obj_property name="ElementShortName">dout[7:0]</obj_property>
<obj_property name="ObjectShortName">dout[7:0]</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/uut/data_from_spi" type="array" db_ref_id="1">
<obj_property name="ElementShortName">data_from_spi[7:0]</obj_property>
<obj_property name="ObjectShortName">data_from_spi[7:0]</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/oe_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">oe_n</obj_property>
<obj_property name="ObjectShortName">oe_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/spi_clk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">spi_clk</obj_property>
<obj_property name="ObjectShortName">spi_clk</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/spi_di" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">spi_di</obj_property>
<obj_property name="ObjectShortName">spi_di</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/spi_do" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">spi_do</obj_property>
<obj_property name="ObjectShortName">spi_do</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/enviar_dato" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">enviar_dato</obj_property>
<obj_property name="ObjectShortName">enviar_dato</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/recibir_dato" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">recibir_dato</obj_property>
<obj_property name="ObjectShortName">recibir_dato</obj_property>
</wvobject>
<wvobject fp_name="/tb_spi/din" type="array" db_ref_id="1">
<obj_property name="ElementShortName">din[7:0]</obj_property>
<obj_property name="ObjectShortName">din[7:0]</obj_property>
</wvobject>
</wave_config>

View File

@ -1,162 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<wave_config>
<wave_state>
</wave_state>
<db_ref_list>
<db_ref path=".wdb" id="1" type="auto">
<top_modules>
<top_module name="glbl" />
<top_module name="tb_ula" />
</top_modules>
</db_ref>
</db_ref_list>
<WVObjectSize size="34" />
<wvobject fp_name="/tb_ula/clk14" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk14</obj_property>
<obj_property name="ObjectShortName">clk14</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/clk7" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk7</obj_property>
<obj_property name="ObjectShortName">clk7</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/hc[0]" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">[0]</obj_property>
<obj_property name="ObjectShortName">hc[0]</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/cpuclk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">cpuclk</obj_property>
<obj_property name="ObjectShortName">cpuclk</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/hc" type="array" db_ref_id="1">
<obj_property name="ElementShortName">hc[8:0]</obj_property>
<obj_property name="ObjectShortName">hc[8:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/vc" type="array" db_ref_id="1">
<obj_property name="ElementShortName">vc[8:0]</obj_property>
<obj_property name="ObjectShortName">vc[8:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/VideoEnable" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">VideoEnable</obj_property>
<obj_property name="ObjectShortName">VideoEnable</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/MayContend_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">MayContend_n</obj_property>
<obj_property name="ObjectShortName">MayContend_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/CauseContention_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">CauseContention_n</obj_property>
<obj_property name="ObjectShortName">CauseContention_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/CancelContention" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">CancelContention</obj_property>
<obj_property name="ObjectShortName">CancelContention</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/BitmapAddr" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">BitmapAddr</obj_property>
<obj_property name="ObjectShortName">BitmapAddr</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/AttrAddr" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">AttrAddr</obj_property>
<obj_property name="ObjectShortName">AttrAddr</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/BitmapDataLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">BitmapDataLoad</obj_property>
<obj_property name="ObjectShortName">BitmapDataLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/AttrDataLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">AttrDataLoad</obj_property>
<obj_property name="ObjectShortName">AttrDataLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/va" type="array" db_ref_id="1">
<obj_property name="ElementShortName">va[13:0]</obj_property>
<obj_property name="ObjectShortName">va[13:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/vramdata" type="array" db_ref_id="1">
<obj_property name="ElementShortName">vramdata[7:0]</obj_property>
<obj_property name="ObjectShortName">vramdata[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/BitmapData" type="array" db_ref_id="1">
<obj_property name="ElementShortName">BitmapData[7:0]</obj_property>
<obj_property name="ObjectShortName">BitmapData[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/AttrData" type="array" db_ref_id="1">
<obj_property name="ElementShortName">AttrData[7:0]</obj_property>
<obj_property name="ObjectShortName">AttrData[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/SerializerLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">SerializerLoad</obj_property>
<obj_property name="ObjectShortName">SerializerLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/AttrOutputLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">AttrOutputLoad</obj_property>
<obj_property name="ObjectShortName">AttrOutputLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/CA" type="array" db_ref_id="1">
<obj_property name="ElementShortName">CA[4:0]</obj_property>
<obj_property name="ObjectShortName">CA[4:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/uut/CALoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">CALoad</obj_property>
<obj_property name="ObjectShortName">CALoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/rst_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">rst_n</obj_property>
<obj_property name="ObjectShortName">rst_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/mreq_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">mreq_n</obj_property>
<obj_property name="ObjectShortName">mreq_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/iorq_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">iorq_n</obj_property>
<obj_property name="ObjectShortName">iorq_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/rd_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">rd_n</obj_property>
<obj_property name="ObjectShortName">rd_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/wr_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">wr_n</obj_property>
<obj_property name="ObjectShortName">wr_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/a" type="array" db_ref_id="1">
<obj_property name="ElementShortName">a[15:0]</obj_property>
<obj_property name="ObjectShortName">a[15:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/va" type="array" db_ref_id="1">
<obj_property name="ElementShortName">va[13:0]</obj_property>
<obj_property name="ObjectShortName">va[13:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/r" type="array" db_ref_id="1">
<obj_property name="ElementShortName">r[2:0]</obj_property>
<obj_property name="ObjectShortName">r[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/g" type="array" db_ref_id="1">
<obj_property name="ElementShortName">g[2:0]</obj_property>
<obj_property name="ObjectShortName">g[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/b" type="array" db_ref_id="1">
<obj_property name="ElementShortName">b[2:0]</obj_property>
<obj_property name="ObjectShortName">b[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/csync" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">csync</obj_property>
<obj_property name="ObjectShortName">csync</obj_property>
</wvobject>
<wvobject fp_name="/tb_ula/int_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">int_n</obj_property>
<obj_property name="ObjectShortName">int_n</obj_property>
</wvobject>
</wave_config>

View File

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<wave_config>
<wave_state>
</wave_state>
<db_ref_list>
<db_ref path="C:/Users/rodriguj/Documents/zxspectrum/zxuno/cores/ula_reloaded/tb_zxuno_isim_beh.wdb" id="1" type="auto">
<top_modules>
<top_module name="glbl" />
<top_module name="mapa_es" />
<top_module name="numeric_std" />
<top_module name="std_logic_1164" />
<top_module name="std_logic_arith" />
<top_module name="std_logic_unsigned" />
<top_module name="t80_pack" />
<top_module name="tb_zxuno" />
</top_modules>
</db_ref>
</db_ref_list>
<WVObjectSize size="51" />
<wvobject fp_name="/tb_zxuno/clk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk</obj_property>
<obj_property name="ObjectShortName">clk</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/addr_rom_16k" type="array" db_ref_id="1">
<obj_property name="ElementShortName">addr_rom_16k[13:0]</obj_property>
<obj_property name="ObjectShortName">addr_rom_16k[13:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/sram_addr" type="array" db_ref_id="1">
<obj_property name="ElementShortName">sram_addr[18:0]</obj_property>
<obj_property name="ObjectShortName">sram_addr[18:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/sram_we_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">sram_we_n</obj_property>
<obj_property name="ObjectShortName">sram_we_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/sram_data" type="array" db_ref_id="1">
<obj_property name="ElementShortName">sram_data[7:0]</obj_property>
<obj_property name="ObjectShortName">sram_data[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/rom_dout" type="array" db_ref_id="1">
<obj_property name="ElementShortName">rom_dout[7:0]</obj_property>
<obj_property name="ObjectShortName">rom_dout[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="divider16" type="divider">
<obj_property name="label">VIDEO</obj_property>
<obj_property name="DisplayName">label</obj_property>
<obj_property name="BkColor">128 128 255</obj_property>
<obj_property name="TextColor">230 230 230</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/r" type="array" db_ref_id="1">
<obj_property name="ElementShortName">r[2:0]</obj_property>
<obj_property name="ObjectShortName">r[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/g" type="array" db_ref_id="1">
<obj_property name="ElementShortName">g[2:0]</obj_property>
<obj_property name="ObjectShortName">g[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/b" type="array" db_ref_id="1">
<obj_property name="ElementShortName">b[2:0]</obj_property>
<obj_property name="ObjectShortName">b[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/csync" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">csync</obj_property>
<obj_property name="ObjectShortName">csync</obj_property>
</wvobject>
<wvobject fp_name="divider21" type="divider">
<obj_property name="label">ULA</obj_property>
<obj_property name="DisplayName">label</obj_property>
<obj_property name="BkColor">128 128 255</obj_property>
<obj_property name="TextColor">230 230 230</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/clk7" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk7</obj_property>
<obj_property name="ObjectShortName">clk7</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/int_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">int_n</obj_property>
<obj_property name="ObjectShortName">int_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/hc" type="array" db_ref_id="1">
<obj_property name="ElementShortName">hc[8:0]</obj_property>
<obj_property name="ObjectShortName">hc[8:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/vc" type="array" db_ref_id="1">
<obj_property name="ElementShortName">vc[8:0]</obj_property>
<obj_property name="ObjectShortName">vc[8:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/dout" type="array" db_ref_id="1">
<obj_property name="ElementShortName">dout[7:0]</obj_property>
<obj_property name="ObjectShortName">dout[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/CLKWait" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">CLKWait</obj_property>
<obj_property name="ObjectShortName">CLKWait</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/StopCLK" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">StopCLK</obj_property>
<obj_property name="ObjectShortName">StopCLK</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/BitmapAddr" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">BitmapAddr</obj_property>
<obj_property name="ObjectShortName">BitmapAddr</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/BitmapDataLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">BitmapDataLoad</obj_property>
<obj_property name="ObjectShortName">BitmapDataLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/AttrAddr" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">AttrAddr</obj_property>
<obj_property name="ObjectShortName">AttrAddr</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/AttrDataLoad" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">AttrDataLoad</obj_property>
<obj_property name="ObjectShortName">AttrDataLoad</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/state" type="array" db_ref_id="1">
<obj_property name="ElementShortName">state[2:0]</obj_property>
<obj_property name="ObjectShortName">state[2:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/ioreqall_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">ioreqall_n</obj_property>
<obj_property name="ObjectShortName">ioreqall_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/Nor1" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">Nor1</obj_property>
<obj_property name="ObjectShortName">Nor1</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/Nor2" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">Nor2</obj_property>
<obj_property name="ObjectShortName">Nor2</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/la_ula/CLKContention" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">CLKContention</obj_property>
<obj_property name="ObjectShortName">CLKContention</obj_property>
</wvobject>
<wvobject fp_name="divider20" type="divider">
<obj_property name="label">CPU</obj_property>
<obj_property name="DisplayName">label</obj_property>
<obj_property name="BkColor">128 128 255</obj_property>
<obj_property name="TextColor">230 230 230</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/clk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk</obj_property>
<obj_property name="ObjectShortName">clk</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/A" type="array" db_ref_id="1">
<obj_property name="ElementShortName">A[15:0]</obj_property>
<obj_property name="ObjectShortName">A[15:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/di" type="array" db_ref_id="1">
<obj_property name="ElementShortName">di[7:0]</obj_property>
<obj_property name="ObjectShortName">di[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/dout" type="array" db_ref_id="1">
<obj_property name="ElementShortName">dout[7:0]</obj_property>
<obj_property name="ObjectShortName">dout[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/mreq_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">mreq_n</obj_property>
<obj_property name="ObjectShortName">mreq_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/iorq_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">iorq_n</obj_property>
<obj_property name="ObjectShortName">iorq_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/rd_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">rd_n</obj_property>
<obj_property name="ObjectShortName">rd_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/wr_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">wr_n</obj_property>
<obj_property name="ObjectShortName">wr_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/m1_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">m1_n</obj_property>
<obj_property name="ObjectShortName">m1_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/el_z80/rfsh_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">rfsh_n</obj_property>
<obj_property name="ObjectShortName">rfsh_n</obj_property>
</wvobject>
<wvobject fp_name="divider34" type="divider">
<obj_property name="label">DUAL PORT MEMORY</obj_property>
<obj_property name="DisplayName">label</obj_property>
<obj_property name="BkColor">128 128 255</obj_property>
<obj_property name="TextColor">230 230 230</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/clk" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">clk</obj_property>
<obj_property name="ObjectShortName">clk</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/a1" type="array" db_ref_id="1">
<obj_property name="ElementShortName">a1[18:0]</obj_property>
<obj_property name="ObjectShortName">a1[18:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/dout1" type="array" db_ref_id="1">
<obj_property name="ElementShortName">dout1[7:0]</obj_property>
<obj_property name="ObjectShortName">dout1[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/a2" type="array" db_ref_id="1">
<obj_property name="ElementShortName">a2[18:0]</obj_property>
<obj_property name="ObjectShortName">a2[18:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/din2" type="array" db_ref_id="1">
<obj_property name="ElementShortName">din2[7:0]</obj_property>
<obj_property name="ObjectShortName">din2[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/dout2" type="array" db_ref_id="1">
<obj_property name="ElementShortName">dout2[7:0]</obj_property>
<obj_property name="ObjectShortName">dout2[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/a" type="array" db_ref_id="1">
<obj_property name="ElementShortName">a[18:0]</obj_property>
<obj_property name="ObjectShortName">a[18:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/d" type="array" db_ref_id="1">
<obj_property name="ElementShortName">d[7:0]</obj_property>
<obj_property name="ObjectShortName">d[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/we_n" type="logic" db_ref_id="1">
<obj_property name="ElementShortName">we_n</obj_property>
<obj_property name="ObjectShortName">we_n</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/doutput1" type="array" db_ref_id="1">
<obj_property name="ElementShortName">doutput1[7:0]</obj_property>
<obj_property name="ObjectShortName">doutput1[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
<wvobject fp_name="/tb_zxuno/uut/dos_memorias/doutput2" type="array" db_ref_id="1">
<obj_property name="ElementShortName">doutput2[7:0]</obj_property>
<obj_property name="ObjectShortName">doutput2[7:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property>
</wvobject>
</wave_config>

View File

@ -1,432 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
typedef unsigned char BYTE;
/*
8 8 3 5 3 5
AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
AAA = semifila del teclado a modificar | esta información está
DDDDD = dato (AND negado con lo que haya) de esa semifila | repetida para dos teclas
MRN = Master reset, Reset de usuario, NMI
JJJJJ = estado del joystick al pulsar tecla. Posiciones UDLRX
MMM = la tecla es un modificador
XXXXX = Reservado para uso futuro
Ej: en la dirección de memoria correspondiente al código de la tecla ESC,
que correspondería a la pulsación simultánea de CAPS SHIFT+SPACE, pondríamos:
00000001 11100001 000 00000 000 00000
Esto es: se activan las semifilas 0 y 7, y en cada una, se activa el bit 0
256 codigos + E0 = 512 codigos
SHIFT, CTRL, ALT = 8 combinaciones
512*8=4096 direcciones x 32 bits = 16384 bytes
En el core se dispondrá como una memoria de 16384x8 bits
Cada tecla ocupará cuatro direcciones consecutivas.
D+0 : tecla1 (o 0 si no la hay)
D+1 : tecla2 (o 0 si no la hay)
D+2 : señales de reset y joystick, 0 si no hay
D+3 : modificadores y señales de usuario, 0 si no hay
*/
// You shouldn't have to touch these defs unless your Spectrum has a different keyboard
// layout (because, for example, you are using a different ROM
#define SP_1 0x61
#define SP_2 0x62
#define SP_3 0x64
#define SP_4 0x68
#define SP_5 0x70
#define SP_0 0x81
#define SP_9 0x82
#define SP_8 0x84
#define SP_7 0x88
#define SP_6 0x90
#define SP_Q 0x41
#define SP_W 0x42
#define SP_E 0x44
#define SP_R 0x48
#define SP_T 0x50
#define SP_P 0xA1
#define SP_O 0xA2
#define SP_I 0xA4
#define SP_U 0xA8
#define SP_Y 0xB0
#define SP_A 0x21
#define SP_S 0x22
#define SP_D 0x24
#define SP_F 0x28
#define SP_G 0x30
#define SP_ENTER 0xC1
#define SP_L 0xC2
#define SP_K 0xC4
#define SP_J 0xC8
#define SP_H 0xD0
#define SP_CAPS 0x01
#define SP_Z 0x02
#define SP_X 0x04
#define SP_C 0x08
#define SP_V 0x10
#define SP_SPACE 0xE1
#define SP_SYMBOL 0xE2
#define SP_M 0xE4
#define SP_N 0xE8
#define SP_B 0xF0
#define SP_BANG (SP_SYMBOL<<8) | SP_1
#define SP_AT (SP_SYMBOL<<8) | SP_2
#define SP_HASH (SP_SYMBOL<<8) | SP_3
#define SP_DOLLAR (SP_SYMBOL<<8) | SP_4
#define SP_PERCEN (SP_SYMBOL<<8) | SP_5
#define SP_AMP (SP_SYMBOL<<8) | SP_6
#define SP_APOSTRO (SP_SYMBOL<<8) | SP_7
#define SP_PAROPEN (SP_SYMBOL<<8) | SP_8
#define SP_PARCLOS (SP_SYMBOL<<8) | SP_9
#define SP_UNDERSC (SP_SYMBOL<<8) | SP_0
#define SP_LESS (SP_SYMBOL<<8) | SP_R
#define SP_LESSEQ (SP_SYMBOL<<8) | SP_Q
#define SP_GREATER (SP_SYMBOL<<8) | SP_T
#define SP_GREATEQ (SP_SYMBOL<<8) | SP_E
#define SP_NOTEQ (SP_SYMBOL<<8) | SP_W
#define SP_BRAOPEN (SP_SYMBOL<<8) | SP_Y
#define SP_BRACLOS (SP_SYMBOL<<8) | SP_U
#define SP_SEMICOL (SP_SYMBOL<<8) | SP_O
#define SP_QUOTE (SP_SYMBOL<<8) | SP_P
#define SP_TILDE (SP_SYMBOL<<8) | SP_A
#define SP_PIPE (SP_SYMBOL<<8) | SP_S
#define SP_BACKSLA (SP_SYMBOL<<8) | SP_D
#define SP_CUROPEN (SP_SYMBOL<<8) | SP_F
#define SP_CURCLOS (SP_SYMBOL<<8) | SP_G
#define SP_CARET (SP_SYMBOL<<8) | SP_H
#define SP_MINUS (SP_SYMBOL<<8) | SP_J
#define SP_PLUS (SP_SYMBOL<<8) | SP_K
#define SP_EQUAL (SP_SYMBOL<<8) | SP_L
#define SP_COLON (SP_SYMBOL<<8) | SP_Z
#define SP_POUND (SP_SYMBOL<<8) | SP_X
#define SP_QUEST (SP_SYMBOL<<8) | SP_C
#define SP_SLASH (SP_SYMBOL<<8) | SP_V
#define SP_STAR (SP_SYMBOL<<8) | SP_B
#define SP_COMMA (SP_SYMBOL<<8) | SP_N
#define SP_DOT (SP_SYMBOL<<8) | SP_M
#define SP_EXTEND (SP_CAPS<<8) | SP_SYMBOL
#define SP_EDIT (SP_CAPS<<8) | SP_1
#define SP_CPSLOCK (SP_CAPS<<8) | SP_2
#define SP_TRUE (SP_CAPS<<8) | SP_3
#define SP_INVERSE (SP_CAPS<<8) | SP_4
#define SP_LEFT (SP_CAPS<<8) | SP_5
#define SP_DOWN (SP_CAPS<<8) | SP_6
#define SP_UP (SP_CAPS<<8) | SP_7
#define SP_RIGHT (SP_CAPS<<8) | SP_8
#define SP_GRAPH (SP_CAPS<<8) | SP_9
#define SP_DELETE (SP_CAPS<<8) | SP_0
#define SP_BREAK (SP_CAPS<<8) | SP_SPACE
// END of Spectrum keys definitions
// Definitions for additional signals generated by the keyboard core
// AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
#define MODIFIER1 0x20
#define MODIFIER2 0x40
#define MODIFIER3 0x80
#define MRESET 0x80
#define URESET 0x40
#define NMI 0x20
#define JOYUP 0x10
#define JOYDOWN 0x08
#define JOYLEFT 0x04
#define JOYRIGHT 0x02
#define JOYFIRE 0x01
#define USER5 0x10
#define USER4 0x08
#define USER3 0x04
#define USER2 0x02
#define USER1 0x01
// End of additional signals
// A key can be pressed with up to three key modifiers
// which generates 8 combinations for each key
#define EXT 0x100
#define MD1 0x200
#define MD2 0x400
#define MD3 0x800
// Scan code 2 list. First, non localized keys
#define PC_A 0x1C
#define PC_B 0x32
#define PC_C 0x21
#define PC_D 0x23
#define PC_E 0x24
#define PC_F 0x2B
#define PC_G 0x34
#define PC_H 0x33
#define PC_I 0x43
#define PC_J 0x3B
#define PC_K 0x42
#define PC_L 0x4B
#define PC_M 0x3A
#define PC_N 0x31
#define PC_O 0x44
#define PC_P 0x4D
#define PC_Q 0x15
#define PC_R 0x2D
#define PC_S 0x1B
#define PC_T 0x2C
#define PC_U 0x3C
#define PC_V 0x2A
#define PC_W 0x1D
#define PC_X 0x22
#define PC_Y 0x35
#define PC_Z 0x1A
#define PC_0 0x45
#define PC_1 0x16
#define PC_2 0x1E
#define PC_3 0x26
#define PC_4 0x25
#define PC_5 0x2E
#define PC_6 0x36
#define PC_7 0x3D
#define PC_8 0x3E
#define PC_9 0x46
#define PC_F1 0x05
#define PC_F2 0x06
#define PC_F3 0x04
#define PC_F4 0x0C
#define PC_F5 0x03
#define PC_F6 0x0B
#define PC_F7 0x83
#define PC_F8 0x0A
#define PC_F9 0x01
#define PC_F10 0x09
#define PC_F11 0x78
#define PC_F12 0x07
#define PC_ESC 0x76
#define PC_SPACE 0x29
#define PC_LCTRL 0x14
#define PC_RCTRL 0x14 | EXT
#define PC_LSHIFT 0x12
#define PC_RSHIFT 0x59
#define PC_LALT 0x11
#define PC_RALT 0x11 | EXT
#define PC_LWIN 0x1F | EXT
#define PC_RWIN 0x27 | EXT
#define PC_APPS 0x2F | EXT
#define PC_TAB 0x0D
#define PC_CPSLOCK 0x58
#define PC_SCRLOCK 0x7E
#define PC_INSERT 0x70 | EXT
#define PC_DELETE 0x71 | EXT
#define PC_HOME 0x6C | EXT
#define PC_END 0x69 | EXT
#define PC_PGUP 0x7D | EXT
#define PC_PGDOWN 0x7A | EXT
#define PC_BKSPACE 0x66
#define PC_ENTER 0x5A
#define PC_UP 0x75 | EXT
#define PC_DOWN 0x72 | EXT
#define PC_LEFT 0x6B | EXT
#define PC_RIGHT 0x74 | EXT
#define PC_NUMLOCK 0x77
#define PC_KP_DIVIS 0x4A | EXT
#define PC_KP_MULT 0x7C
#define PC_KP_MINUS 0x7B
#define PC_KP_PLUS 0x79
#define PC_KP_ENTER 0x5A | EXT
#define PC_KP_DOT 0x71
#define PC_KP_0 0x70
#define PC_KP_1 0x69
#define PC_KP_2 0x72
#define PC_KP_3 0x7A
#define PC_KP_4 0x6B
#define PC_KP_5 0x73
#define PC_KP_6 0x74
#define PC_KP_7 0x6C
#define PC_KP_8 0x75
#define PC_KP_9 0x7D
// Localized keyboards start to differenciate from here
// Localized keyboard ES (Spain)
#define PC_BACKSLA 0x0E
#define PC_APOSTRO 0x4E
#define PC_OPNBANG 0x55
#define PC_GRAVEAC 0x54
#define PC_PLUS 0x5B
#define PC_EGNE 0x4C
#define PC_ACUTEAC 0x52
#define PC_CEDILLA 0x5D
#define PC_LESS 0x61
#define PC_COMMA 0x41
#define PC_DOT 0x49
#define PC_MINUS 0x4A
#define MAP(pc,sp,rj,mu) { \
rom[(pc)*4] = (((sp)>>8)&0xFF); \
rom[(pc)*4+1] = (((sp))&0xFF); \
rom[(pc)*4+2] = (rj); \
rom[(pc)*4+3] = (mu); \
}
#define MAPANY(pc,sp,rj,mu) { \
MAP(pc,sp,rj,mu); \
MAP(MD1|pc,sp,rj,mu); \
MAP(MD2|pc,sp,rj,mu); \
MAP(MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|pc,sp,rj,mu); \
MAP(MD1|MD3|pc,sp,rj,mu); \
MAP(MD2|MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|MD3|pc,sp,rj,mu); \
}
#define CLEANMAP { \
int i; \
for (i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
rom[i] = 0; \
}
#define SAVEMAPHEX(name) { \
FILE *f; \
int i; \
f=fopen(name,"w"); \
for(i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
fprintf(f,"%.2X\n",rom[i]); \
fclose(f); \
}
#define SAVEMAPBIN(name) { \
FILE *f; \
int i; \
f=fopen(name,"wb"); \
fwrite (rom, 1, sizeof(rom), f); \
fclose(f); \
}
int main()
{
BYTE rom[16384];
CLEANMAP;
MAPANY(PC_LSHIFT,SP_CAPS,0,0);
MAPANY(PC_RSHIFT,SP_CAPS,0,0);
MAPANY(PC_LCTRL,SP_SYMBOL,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_RCTRL,SP_SYMBOL,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_LALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
MAPANY(PC_RALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
// Basic mapping: each key from PC is mapped to a key in the Spectrum
MAPANY(PC_1,SP_1,0,0);
MAPANY(PC_2,SP_2,0,0);
MAPANY(PC_3,SP_3,0,0);
MAPANY(PC_4,SP_4,0,0);
MAPANY(PC_5,SP_5,0,0);
MAPANY(PC_6,SP_6,0,0);
MAPANY(PC_7,SP_7,0,0);
MAPANY(PC_8,SP_8,0,0);
MAPANY(PC_9,SP_9,0,0);
MAPANY(PC_0,SP_0,0,0);
MAPANY(PC_Q,SP_Q,0,0);
MAPANY(PC_W,SP_W,0,0);
MAPANY(PC_E,SP_E,0,0);
MAPANY(PC_R,SP_R,0,0);
MAPANY(PC_T,SP_T,0,0);
MAPANY(PC_Y,SP_Y,0,0);
MAPANY(PC_U,SP_U,0,0);
MAPANY(PC_I,SP_I,0,0);
MAPANY(PC_O,SP_O,0,0);
MAPANY(PC_P,SP_P,0,0);
MAPANY(PC_A,SP_A,0,0);
MAPANY(PC_S,SP_S,0,0);
MAPANY(PC_D,SP_D,0,0);
MAPANY(PC_F,SP_F,0,0);
MAPANY(PC_G,SP_G,0,0);
MAPANY(PC_H,SP_H,0,0);
MAPANY(PC_J,SP_J,0,0);
MAPANY(PC_K,SP_K,0,0);
MAPANY(PC_L,SP_L,0,0);
MAPANY(PC_Z,SP_Z,0,0);
MAPANY(PC_X,SP_X,0,0);
MAPANY(PC_C,SP_C,0,0);
MAPANY(PC_V,SP_V,0,0);
MAPANY(PC_B,SP_B,0,0);
MAPANY(PC_N,SP_N,0,0);
MAPANY(PC_M,SP_M,0,0);
MAPANY(PC_SPACE,SP_SPACE,0,0);
MAPANY(PC_ENTER,SP_ENTER,0,0);
MAPANY(PC_ESC,SP_BREAK,0,0);
MAPANY(PC_CPSLOCK,SP_CPSLOCK,0,0);
MAPANY(PC_TAB,SP_EXTEND,0,0);
MAP(PC_BKSPACE,SP_DELETE,0,0);
MAPANY(PC_UP,SP_UP,0,0);
MAPANY(PC_DOWN,SP_DOWN,0,0);
MAPANY(PC_LEFT,SP_LEFT,0,0);
MAPANY(PC_RIGHT,SP_RIGHT,0,0);
MAPANY(PC_F2,SP_EDIT,0,0);
MAPANY(PC_F3,SP_TRUE,0,0);
MAPANY(PC_F4,SP_INVERSE,0,0);
MAP(PC_F5|MD2|MD3,0,NMI,0); // Ctrl-Alt-F5 for NMI
MAPANY(PC_F10,SP_GRAPH,0,0); // F10 habilita el modo gráfico. Esto es para Antonio, para la BIOS
MAP(PC_DELETE|MD2|MD3,0,URESET,0); //
MAP(PC_KP_DOT|MD2|MD3,0,URESET,0); // Ctrl-Alt-Del for user reset
MAP(PC_BKSPACE|MD2|MD3,0,MRESET,0); // Ctrl-Alt-BkSpace for master reset
//keypad
MAPANY(PC_KP_1,SP_1,0,0);
MAPANY(PC_KP_2,SP_2,0,0);
MAPANY(PC_KP_3,SP_3,0,0);
MAPANY(PC_KP_4,SP_4,0,0);
MAPANY(PC_KP_5,SP_5,0,0);
MAPANY(PC_KP_6,SP_6,0,0);
MAPANY(PC_KP_7,SP_7,0,0);
MAPANY(PC_KP_8,SP_8,0,0);
MAPANY(PC_KP_9,SP_9,0,0);
MAPANY(PC_KP_0,SP_0,0,0);
MAPANY(PC_KP_DIVIS,SP_SLASH,0,0);
MAPANY(PC_KP_MULT,SP_STAR,0,0);
MAPANY(PC_KP_MINUS,SP_MINUS,0,0);
MAPANY(PC_KP_PLUS,SP_PLUS,0,0);
MAPANY(PC_KP_ENTER,SP_ENTER,0,0);
MAPANY(PC_KP_DOT,SP_DOT,0,0);
MAPANY(PC_BACKSLA,SP_COLON,0,0);
MAPANY(PC_APOSTRO,SP_DOLLAR,0,0);
MAPANY(PC_OPNBANG,SP_EQUAL,0,0);
MAPANY(PC_GRAVEAC,SP_PAROPEN,0,0);
MAPANY(PC_PLUS,SP_PARCLOS,0,0);
MAPANY(PC_EGNE,SP_SEMICOL,0,0);
MAPANY(PC_ACUTEAC,SP_QUOTE,0,0);
MAPANY(PC_COMMA,SP_COMMA,0,0);
MAPANY(PC_DOT,SP_DOT,0,0);
MAPANY(PC_MINUS,SP_SLASH,0,0);
MAPANY(PC_HOME,0,JOYUP,0);
MAPANY(PC_END,0,JOYDOWN,0);
MAPANY(PC_DELETE,0,JOYLEFT,0);
MAPANY(PC_PGDOWN,0,JOYRIGHT,0);
// MAP(PC_F12,0,0,USER1); // Evento de usuario 1
// End of mapping. Save .HEX file for Verilog
SAVEMAPHEX("keyb_av_hex.txt");
// And map file for loading from ESXDOS
SAVEMAPBIN("keymaps\\AV");
}

View File

@ -1,492 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
typedef unsigned char BYTE;
/*
8 8 3 5 3 5
AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
AAA = semifila del teclado a modificar | esta información está
DDDDD = dato (AND negado con lo que haya) de esa semifila | repetida para dos teclas
MRN = Master reset, Reset de usuario, NMI
JJJJJ = estado del joystick al pulsar tecla. Posiciones UDLRX
MMM = la tecla es un modificador
XXXXX = Reservado para uso futuro
Ej: en la dirección de memoria correspondiente al código de la tecla ESC,
que correspondería a la pulsación simultánea de CAPS SHIFT+SPACE, pondríamos:
00000001 11100001 000 00000 000 00000
Esto es: se activan las semifilas 0 y 7, y en cada una, se activa el bit 0
256 codigos + E0 = 512 codigos
SHIFT, CTRL, ALT = 8 combinaciones
512*8=4096 direcciones x 32 bits = 16384 bytes
En el core se dispondrá como una memoria de 16384x8 bits
Cada tecla ocupará cuatro direcciones consecutivas.
D+0 : tecla1 (o 0 si no la hay)
D+1 : tecla2 (o 0 si no la hay)
D+2 : señales de reset y joystick, 0 si no hay
D+3 : modificadores y señales de usuario, 0 si no hay
*/
// You shouldn't have to touch these defs unless your Spectrum has a different keyboard
// layout (because, for example, you are using a different ROM
#define SP_1 0x61
#define SP_2 0x62
#define SP_3 0x64
#define SP_4 0x68
#define SP_5 0x70
#define SP_0 0x81
#define SP_9 0x82
#define SP_8 0x84
#define SP_7 0x88
#define SP_6 0x90
#define SP_Q 0x41
#define SP_W 0x42
#define SP_E 0x44
#define SP_R 0x48
#define SP_T 0x50
#define SP_P 0xA1
#define SP_O 0xA2
#define SP_I 0xA4
#define SP_U 0xA8
#define SP_Y 0xB0
#define SP_A 0x21
#define SP_S 0x22
#define SP_D 0x24
#define SP_F 0x28
#define SP_G 0x30
#define SP_ENTER 0xC1
#define SP_L 0xC2
#define SP_K 0xC4
#define SP_J 0xC8
#define SP_H 0xD0
#define SP_CAPS 0x01
#define SP_Z 0x02
#define SP_X 0x04
#define SP_C 0x08
#define SP_V 0x10
#define SP_SPACE 0xE1
#define SP_SYMBOL 0xE2
#define SP_M 0xE4
#define SP_N 0xE8
#define SP_B 0xF0
#define SP_BANG (SP_SYMBOL<<8) | SP_1
#define SP_AT (SP_SYMBOL<<8) | SP_2
#define SP_HASH (SP_SYMBOL<<8) | SP_3
#define SP_DOLLAR (SP_SYMBOL<<8) | SP_4
#define SP_PERCEN (SP_SYMBOL<<8) | SP_5
#define SP_AMP (SP_SYMBOL<<8) | SP_6
#define SP_APOSTRO (SP_SYMBOL<<8) | SP_7
#define SP_PAROPEN (SP_SYMBOL<<8) | SP_8
#define SP_PARCLOS (SP_SYMBOL<<8) | SP_9
#define SP_UNDERSC (SP_SYMBOL<<8) | SP_0
#define SP_LESS (SP_SYMBOL<<8) | SP_R
#define SP_LESSEQ (SP_SYMBOL<<8) | SP_Q
#define SP_GREATER (SP_SYMBOL<<8) | SP_T
#define SP_GREATEQ (SP_SYMBOL<<8) | SP_E
#define SP_NOTEQ (SP_SYMBOL<<8) | SP_W
#define SP_BRAOPEN (SP_SYMBOL<<8) | SP_Y
#define SP_BRACLOS (SP_SYMBOL<<8) | SP_U
#define SP_SEMICOL (SP_SYMBOL<<8) | SP_O
#define SP_QUOTE (SP_SYMBOL<<8) | SP_P
#define SP_TILDE (SP_SYMBOL<<8) | SP_A
#define SP_PIPE (SP_SYMBOL<<8) | SP_S
#define SP_BACKSLA (SP_SYMBOL<<8) | SP_D
#define SP_CUROPEN (SP_SYMBOL<<8) | SP_F
#define SP_CURCLOS (SP_SYMBOL<<8) | SP_G
#define SP_CARET (SP_SYMBOL<<8) | SP_H
#define SP_MINUS (SP_SYMBOL<<8) | SP_J
#define SP_PLUS (SP_SYMBOL<<8) | SP_K
#define SP_EQUAL (SP_SYMBOL<<8) | SP_L
#define SP_COLON (SP_SYMBOL<<8) | SP_Z
#define SP_POUND (SP_SYMBOL<<8) | SP_X
#define SP_QUEST (SP_SYMBOL<<8) | SP_C
#define SP_SLASH (SP_SYMBOL<<8) | SP_V
#define SP_STAR (SP_SYMBOL<<8) | SP_B
#define SP_COMMA (SP_SYMBOL<<8) | SP_N
#define SP_DOT (SP_SYMBOL<<8) | SP_M
#define SP_EXTEND (SP_CAPS<<8) | SP_SYMBOL
#define SP_EDIT (SP_CAPS<<8) | SP_1
#define SP_CPSLOCK (SP_CAPS<<8) | SP_2
#define SP_TRUE (SP_CAPS<<8) | SP_3
#define SP_INVERSE (SP_CAPS<<8) | SP_4
#define SP_LEFT (SP_CAPS<<8) | SP_5
#define SP_DOWN (SP_CAPS<<8) | SP_6
#define SP_UP (SP_CAPS<<8) | SP_7
#define SP_RIGHT (SP_CAPS<<8) | SP_8
#define SP_GRAPH (SP_CAPS<<8) | SP_9
#define SP_DELETE (SP_CAPS<<8) | SP_0
#define SP_BREAK (SP_CAPS<<8) | SP_SPACE
// END of Spectrum keys definitions
// Definitions for additional signals generated by the keyboard core
// AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
#define MODIFIER1 0x20
#define MODIFIER2 0x40
#define MODIFIER3 0x80
#define MRESET 0x80
#define URESET 0x40
#define NMI 0x20
#define JOYUP 0x10
#define JOYDOWN 0x08
#define JOYLEFT 0x04
#define JOYRIGHT 0x02
#define JOYFIRE 0x01
#define USER5 0x10
#define USER4 0x08
#define USER3 0x04
#define USER2 0x02
#define USER1 0x01
// End of additional signals
// A key can be pressed with up to three key modifiers
// which generates 8 combinations for each key
#define EXT 0x100
#define MD1 0x200
#define MD2 0x400
#define MD3 0x800
// Scan code 2 list. First, non localized keys
#define PC_A 0x1C
#define PC_B 0x32
#define PC_C 0x21
#define PC_D 0x23
#define PC_E 0x24
#define PC_F 0x2B
#define PC_G 0x34
#define PC_H 0x33
#define PC_I 0x43
#define PC_J 0x3B
#define PC_K 0x42
#define PC_L 0x4B
#define PC_M 0x3A
#define PC_N 0x31
#define PC_O 0x44
#define PC_P 0x4D
#define PC_Q 0x15
#define PC_R 0x2D
#define PC_S 0x1B
#define PC_T 0x2C
#define PC_U 0x3C
#define PC_V 0x2A
#define PC_W 0x1D
#define PC_X 0x22
#define PC_Y 0x35
#define PC_Z 0x1A
#define PC_0 0x45
#define PC_1 0x16
#define PC_2 0x1E
#define PC_3 0x26
#define PC_4 0x25
#define PC_5 0x2E
#define PC_6 0x36
#define PC_7 0x3D
#define PC_8 0x3E
#define PC_9 0x46
#define PC_F1 0x05
#define PC_F2 0x06
#define PC_F3 0x04
#define PC_F4 0x0C
#define PC_F5 0x03
#define PC_F6 0x0B
#define PC_F7 0x83
#define PC_F8 0x0A
#define PC_F9 0x01
#define PC_F10 0x09
#define PC_F11 0x78
#define PC_F12 0x07
#define PC_ESC 0x76
#define PC_SPACE 0x29
#define PC_LCTRL 0x14
#define PC_RCTRL 0x14 | EXT
#define PC_LSHIFT 0x12
#define PC_RSHIFT 0x59
#define PC_LALT 0x11
#define PC_RALT 0x11 | EXT
#define PC_LWIN 0x1F | EXT
#define PC_RWIN 0x27 | EXT
#define PC_APPS 0x2F | EXT
#define PC_TAB 0x0D
#define PC_CPSLOCK 0x58
#define PC_SCRLOCK 0x7E
#define PC_INSERT 0x70 | EXT
#define PC_DELETE 0x71 | EXT
#define PC_HOME 0x6C | EXT
#define PC_END 0x69 | EXT
#define PC_PGUP 0x7D | EXT
#define PC_PGDOWN 0x7A | EXT
#define PC_BKSPACE 0x66
#define PC_ENTER 0x5A
#define PC_UP 0x75 | EXT
#define PC_DOWN 0x72 | EXT
#define PC_LEFT 0x6B | EXT
#define PC_RIGHT 0x74 | EXT
#define PC_NUMLOCK 0x77
#define PC_KP_DIVIS 0x4A | EXT
#define PC_KP_MULT 0x7C
#define PC_KP_MINUS 0x7B
#define PC_KP_PLUS 0x79
#define PC_KP_ENTER 0x5A | EXT
#define PC_KP_DOT 0x71
#define PC_KP_0 0x70
#define PC_KP_1 0x69
#define PC_KP_2 0x72
#define PC_KP_3 0x7A
#define PC_KP_4 0x6B
#define PC_KP_5 0x73
#define PC_KP_6 0x74
#define PC_KP_7 0x6C
#define PC_KP_8 0x75
#define PC_KP_9 0x7D
// Localized keyboards start to differenciate from here
// Localized keyboard ES (Spain)
#define PC_BACKSLA 0x0E
#define PC_APOSTRO 0x4E
#define PC_OPNBANG 0x55
#define PC_GRAVEAC 0x54
#define PC_PLUS 0x5B
#define PC_EGNE 0x4C
#define PC_ACUTEAC 0x52
#define PC_CEDILLA 0x5D
#define PC_LESS 0x61
#define PC_COMMA 0x41
#define PC_DOT 0x49
#define PC_MINUS 0x4A
#define MAP(pc,sp,rj,mu) { \
rom[(pc)*4] = (((sp)>>8)&0xFF); \
rom[(pc)*4+1] = (((sp))&0xFF); \
rom[(pc)*4+2] = (rj); \
rom[(pc)*4+3] = (mu); \
}
#define MAPANY(pc,sp,rj,mu) { \
MAP(pc,sp,rj,mu); \
MAP(MD1|pc,sp,rj,mu); \
MAP(MD2|pc,sp,rj,mu); \
MAP(MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|pc,sp,rj,mu); \
MAP(MD1|MD3|pc,sp,rj,mu); \
MAP(MD2|MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|MD3|pc,sp,rj,mu); \
}
#define CLEANMAP { \
int i; \
for (i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
rom[i] = 0; \
}
#define SAVEMAPHEX(name) { \
FILE *f; \
int i; \
f=fopen(name,"w"); \
for(i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
fprintf(f,"%.2X\n",rom[i]); \
fclose(f); \
}
#define SAVEMAPBIN(name) { \
FILE *f; \
int i; \
f=fopen(name,"wb"); \
fwrite (rom, 1, sizeof(rom), f); \
fclose(f); \
}
int main()
{
BYTE rom[16384];
CLEANMAP;
MAPANY(PC_LSHIFT,0,0,MODIFIER1); // MD1 is SHIFT
MAPANY(PC_RSHIFT,0,0,MODIFIER1); // MD1 is SHIFT
MAPANY(PC_LCTRL,0,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_RCTRL,0,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_LALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
MAPANY(PC_RALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
MAPANY(PC_LWIN,SP_CAPS,0,0); // CAPS SHIFT
MAPANY(PC_RWIN,SP_SYMBOL,0,0); // SYMBOL SHIFT
MAPANY(PC_APPS,SP_SYMBOL,0,0); // SYMBOL SHIFT
// Basic mapping: each key from PC is mapped to a key in the Spectrum
MAP(PC_1,SP_1,0,0);
MAP(PC_2,SP_2,0,0);
MAP(PC_3,SP_3,0,0);
MAP(PC_4,SP_4,0,0);
MAP(PC_5,SP_5,0,0);
MAP(PC_6,SP_6,0,0);
MAP(PC_7,SP_7,0,0);
MAP(PC_8,SP_8,0,0);
MAP(PC_9,SP_9,0,0);
MAP(PC_0,SP_0,0,0);
MAP(PC_Q,SP_Q,0,0);
MAP(PC_W,SP_W,0,0);
MAP(PC_E,SP_E,0,0);
MAP(PC_R,SP_R,0,0);
MAP(PC_T,SP_T,0,0);
MAP(PC_Y,SP_Y,0,0);
MAP(PC_U,SP_U,0,0);
MAP(PC_I,SP_I,0,0);
MAP(PC_O,SP_O,0,0);
MAP(PC_P,SP_P,0,0);
MAP(PC_A,SP_A,0,0);
MAP(PC_S,SP_S,0,0);
MAP(PC_D,SP_D,0,0);
MAP(PC_F,SP_F,0,0);
MAP(PC_G,SP_G,0,0);
MAP(PC_H,SP_H,0,0);
MAP(PC_J,SP_J,0,0);
MAP(PC_K,SP_K,0,0);
MAP(PC_L,SP_L,0,0);
MAP(PC_Z,SP_Z,0,0);
MAP(PC_X,SP_X,0,0);
MAP(PC_C,SP_C,0,0);
MAP(PC_V,SP_V,0,0);
MAP(PC_B,SP_B,0,0);
MAP(PC_N,SP_N,0,0);
MAP(PC_M,SP_M,0,0);
MAP(MD1|PC_Q,SP_CAPS<<8|SP_Q,0,0);
MAP(MD1|PC_W,SP_CAPS<<8|SP_W,0,0);
MAP(MD1|PC_E,SP_CAPS<<8|SP_E,0,0);
MAP(MD1|PC_R,SP_CAPS<<8|SP_R,0,0);
MAP(MD1|PC_T,SP_CAPS<<8|SP_T,0,0);
MAP(MD1|PC_Y,SP_CAPS<<8|SP_Y,0,0);
MAP(MD1|PC_U,SP_CAPS<<8|SP_U,0,0);
MAP(MD1|PC_I,SP_CAPS<<8|SP_I,0,0);
MAP(MD1|PC_O,SP_CAPS<<8|SP_O,0,0);
MAP(MD1|PC_P,SP_CAPS<<8|SP_P,0,0);
MAP(MD1|PC_A,SP_CAPS<<8|SP_A,0,0);
MAP(MD1|PC_S,SP_CAPS<<8|SP_S,0,0);
MAP(MD1|PC_D,SP_CAPS<<8|SP_D,0,0);
MAP(MD1|PC_F,SP_CAPS<<8|SP_F,0,0);
MAP(MD1|PC_G,SP_CAPS<<8|SP_G,0,0);
MAP(MD1|PC_H,SP_CAPS<<8|SP_H,0,0);
MAP(MD1|PC_J,SP_CAPS<<8|SP_J,0,0);
MAP(MD1|PC_K,SP_CAPS<<8|SP_K,0,0);
MAP(MD1|PC_L,SP_CAPS<<8|SP_L,0,0);
MAP(MD1|PC_Z,SP_CAPS<<8|SP_Z,0,0);
MAP(MD1|PC_X,SP_CAPS<<8|SP_X,0,0);
MAP(MD1|PC_C,SP_CAPS<<8|SP_C,0,0);
MAP(MD1|PC_V,SP_CAPS<<8|SP_V,0,0);
MAP(MD1|PC_B,SP_CAPS<<8|SP_B,0,0);
MAP(MD1|PC_N,SP_CAPS<<8|SP_N,0,0);
MAP(MD1|PC_M,SP_CAPS<<8|SP_M,0,0);
MAPANY(PC_SPACE,SP_SPACE,0,0);
MAPANY(PC_ENTER,SP_ENTER,0,0);
//Complex mapping. This is for the spanish keyboard although many
//combos can be used with any other PC keyboard
MAPANY(PC_ESC,SP_BREAK,0,0);
MAPANY(PC_CPSLOCK,SP_CPSLOCK,0,0);
MAPANY(PC_TAB,SP_EXTEND,0,0);
MAP(PC_BKSPACE,SP_DELETE,0,0);
MAPANY(PC_UP,SP_UP,0,0);
MAPANY(PC_DOWN,SP_DOWN,0,0);
MAPANY(PC_LEFT,SP_LEFT,0,0);
MAPANY(PC_RIGHT,SP_RIGHT,0,0);
MAPANY(PC_F2,SP_EDIT,0,0);
MAP(PC_F5|MD2|MD3,0,NMI,0); // Ctrl-Alt-F5 for NMI
MAP(PC_F10,SP_GRAPH,0,0); // F10 habilita el modo gráfico. Esto es para Antonio, para la BIOS
MAP(PC_DELETE|MD2|MD3,0,URESET,0); //
MAP(PC_KP_DOT|MD2|MD3,0,URESET,0); // Ctrl-Alt-Del for user reset
MAP(PC_BKSPACE|MD2|MD3,0,MRESET,0); // Ctrl-Alt-BkSpace for master reset
//keypad
MAPANY(PC_KP_DIVIS,SP_SLASH,0,0);
MAPANY(PC_KP_MULT,SP_STAR,0,0);
MAPANY(PC_KP_MINUS,SP_MINUS,0,0);
MAPANY(PC_KP_PLUS,SP_PLUS,0,0);
MAPANY(PC_KP_ENTER,SP_ENTER,0,0);
// a 8-way keyboard joystick on the keypad
MAPANY(PC_KP_7,0,JOYUP|JOYLEFT,0);
MAPANY(PC_KP_8,0,JOYUP,0);
MAPANY(PC_KP_9,0,JOYUP|JOYRIGHT,0);
MAPANY(PC_KP_4,0,JOYLEFT,0);
MAPANY(PC_KP_5,0,JOYDOWN,0);
MAPANY(PC_KP_6,0,JOYRIGHT,0);
MAPANY(PC_KP_1,0,JOYDOWN|JOYLEFT,0);
MAPANY(PC_KP_2,0,JOYDOWN,0);
MAPANY(PC_KP_3,0,JOYDOWN|JOYRIGHT,0);
//Some shift+key mappings for the ES keyboard
MAP(MD1|PC_1,SP_BANG,0,0);
MAP(MD1|PC_2,SP_QUOTE,0,0);
MAP(MD1|PC_3,SP_HASH,0,0);
MAP(MD1|PC_4,SP_DOLLAR,0,0);
MAP(MD1|PC_5,SP_PERCEN,0,0);
MAP(MD1|PC_6,SP_AMP,0,0);
MAP(MD1|PC_7,SP_SLASH,0,0);
MAP(MD1|PC_8,SP_PAROPEN,0,0);
MAP(MD1|PC_9,SP_PARCLOS,0,0);
MAP(MD1|PC_0,SP_EQUAL,0,0);
MAP(PC_APOSTRO,SP_APOSTRO,0,0);
MAP(MD1|PC_APOSTRO,SP_QUEST,0,0);
MAP(PC_GRAVEAC,SP_POUND,0,0);
MAP(MD1|PC_GRAVEAC,SP_CARET,0,0);
MAP(PC_PLUS,SP_PLUS,0,0);
MAP(MD1|PC_PLUS,SP_STAR,0,0);
MAP(PC_ACUTEAC,SP_CUROPEN,0,0);
MAP(MD1|PC_ACUTEAC,SP_CUROPEN,0,0);
MAP(PC_ACUTEAC,SP_CUROPEN,0,0);
MAP(MD1|PC_ACUTEAC,SP_CUROPEN,0,0);
MAP(PC_CEDILLA,SP_CURCLOS,0,0);
MAP(MD1|PC_CEDILLA,SP_QUOTE,0,0);
MAP(PC_COMMA,SP_COMMA,0,0);
MAP(MD1|PC_COMMA,SP_SEMICOL,0,0);
MAP(PC_DOT,SP_DOT,0,0);
MAP(MD1|PC_DOT,SP_COLON,0,0);
MAP(PC_MINUS,SP_MINUS,0,0);
MAP(MD1|PC_MINUS,SP_UNDERSC,0,0);
MAP(PC_BACKSLA,SP_BACKSLA,0,0);
MAP(MD1|PC_BACKSLA,SP_BACKSLA,0,0);
MAP(PC_EGNE,SP_TILDE,0,0);
MAP(PC_LESS,SP_LESS,0,0);
MAP(MD1|PC_LESS,SP_GREATER,0,0);
MAP(MD2|PC_LESS,SP_LESSEQ,0,0);
MAP(MD2|MD1|PC_LESS,SP_GREATEQ,0,0);
MAP(MD3|PC_LESS,SP_NOTEQ,0,0);
MAP(MD3|MD1|PC_LESS,SP_NOTEQ,0,0);
MAP(MD3|MD2|PC_LESS,SP_NOTEQ,0,0);
MAP(MD3|MD2|MD1|PC_LESS,SP_NOTEQ,0,0);
MAP(PC_F12,0,0,USER1); // Evento de usuario 1
MAP(PC_F2|MD2,0,0,USER2); // Evento de usuario 2 = Core 2 (Ctrl+F2)
// End of mapping. Save .HEX file for Verilog
SAVEMAPHEX("keyb_es_hex.txt");
// And map file for loading from ESXDOS
SAVEMAPBIN("keymaps\\ES");
}

View File

@ -1,482 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
typedef unsigned char BYTE;
/*
8 8 3 5 3 5
AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
AAA = semifila del teclado a modificar | esta información está
DDDDD = dato (AND negado con lo que haya) de esa semifila | repetida para dos teclas
MRN = Master reset, Reset de usuario, NMI
JJJJJ = estado del joystick al pulsar tecla. Posiciones UDLRX
MMM = la tecla es un modificador
XXXXX = Reservado para uso futuro
Ej: en la dirección de memoria correspondiente al código de la tecla ESC,
que correspondería a la pulsación simultánea de CAPS SHIFT+SPACE, pondríamos:
00000001 11100001 000 00000 000 00000
Esto es: se activan las semifilas 0 y 7, y en cada una, se activa el bit 0
256 codigos + E0 = 512 codigos
SHIFT, CTRL, ALT = 8 combinaciones
512*8=4096 direcciones x 32 bits = 16384 bytes
En el core se dispondrá como una memoria de 16384x8 bits
Cada tecla ocupará cuatro direcciones consecutivas.
D+0 : tecla1 (o 0 si no la hay)
D+1 : tecla2 (o 0 si no la hay)
D+2 : señales de reset y joystick, 0 si no hay
D+3 : modificadores y señales de usuario, 0 si no hay
*/
// You shouldn't have to touch these defs unless your Spectrum has a different keyboard
// layout (because, for example, you are using a different ROM
#define SP_1 0x61
#define SP_2 0x62
#define SP_3 0x64
#define SP_4 0x68
#define SP_5 0x70
#define SP_0 0x81
#define SP_9 0x82
#define SP_8 0x84
#define SP_7 0x88
#define SP_6 0x90
#define SP_Q 0x41
#define SP_W 0x42
#define SP_E 0x44
#define SP_R 0x48
#define SP_T 0x50
#define SP_P 0xA1
#define SP_O 0xA2
#define SP_I 0xA4
#define SP_U 0xA8
#define SP_Y 0xB0
#define SP_A 0x21
#define SP_S 0x22
#define SP_D 0x24
#define SP_F 0x28
#define SP_G 0x30
#define SP_ENTER 0xC1
#define SP_L 0xC2
#define SP_K 0xC4
#define SP_J 0xC8
#define SP_H 0xD0
#define SP_CAPS 0x01
#define SP_Z 0x02
#define SP_X 0x04
#define SP_C 0x08
#define SP_V 0x10
#define SP_SPACE 0xE1
#define SP_SYMBOL 0xE2
#define SP_M 0xE4
#define SP_N 0xE8
#define SP_B 0xF0
#define SP_BANG (SP_SYMBOL<<8) | SP_1
#define SP_AT (SP_SYMBOL<<8) | SP_2
#define SP_HASH (SP_SYMBOL<<8) | SP_3
#define SP_DOLLAR (SP_SYMBOL<<8) | SP_4
#define SP_PERCEN (SP_SYMBOL<<8) | SP_5
#define SP_AMP (SP_SYMBOL<<8) | SP_6
#define SP_APOSTRO (SP_SYMBOL<<8) | SP_7
#define SP_PAROPEN (SP_SYMBOL<<8) | SP_8
#define SP_PARCLOS (SP_SYMBOL<<8) | SP_9
#define SP_UNDERSC (SP_SYMBOL<<8) | SP_0
#define SP_LESS (SP_SYMBOL<<8) | SP_R
#define SP_LESSEQ (SP_SYMBOL<<8) | SP_Q
#define SP_GREATER (SP_SYMBOL<<8) | SP_T
#define SP_GREATEQ (SP_SYMBOL<<8) | SP_E
#define SP_NOTEQ (SP_SYMBOL<<8) | SP_W
#define SP_BRAOPEN (SP_SYMBOL<<8) | SP_Y
#define SP_BRACLOS (SP_SYMBOL<<8) | SP_U
#define SP_SEMICOL (SP_SYMBOL<<8) | SP_O
#define SP_QUOTE (SP_SYMBOL<<8) | SP_P
#define SP_TILDE (SP_SYMBOL<<8) | SP_A
#define SP_PIPE (SP_SYMBOL<<8) | SP_S
#define SP_BACKSLA (SP_SYMBOL<<8) | SP_D
#define SP_CUROPEN (SP_SYMBOL<<8) | SP_F
#define SP_CURCLOS (SP_SYMBOL<<8) | SP_G
#define SP_CARET (SP_SYMBOL<<8) | SP_H
#define SP_MINUS (SP_SYMBOL<<8) | SP_J
#define SP_PLUS (SP_SYMBOL<<8) | SP_K
#define SP_EQUAL (SP_SYMBOL<<8) | SP_L
#define SP_COLON (SP_SYMBOL<<8) | SP_Z
#define SP_POUND (SP_SYMBOL<<8) | SP_X
#define SP_QUEST (SP_SYMBOL<<8) | SP_C
#define SP_SLASH (SP_SYMBOL<<8) | SP_V
#define SP_STAR (SP_SYMBOL<<8) | SP_B
#define SP_COMMA (SP_SYMBOL<<8) | SP_N
#define SP_DOT (SP_SYMBOL<<8) | SP_M
#define SP_EXTEND (SP_CAPS<<8) | SP_SYMBOL
#define SP_EDIT (SP_CAPS<<8) | SP_1
#define SP_CPSLOCK (SP_CAPS<<8) | SP_2
#define SP_TRUE (SP_CAPS<<8) | SP_3
#define SP_INVERSE (SP_CAPS<<8) | SP_4
#define SP_LEFT (SP_CAPS<<8) | SP_5
#define SP_DOWN (SP_CAPS<<8) | SP_6
#define SP_UP (SP_CAPS<<8) | SP_7
#define SP_RIGHT (SP_CAPS<<8) | SP_8
#define SP_GRAPH (SP_CAPS<<8) | SP_9
#define SP_DELETE (SP_CAPS<<8) | SP_0
#define SP_BREAK (SP_CAPS<<8) | SP_SPACE
// END of Spectrum keys definitions
// Definitions for additional signals generated by the keyboard core
// AAADDDDD AAADDDDD MRN JJJJJ MMM XXXXX
#define MODIFIER1 0x20
#define MODIFIER2 0x40
#define MODIFIER3 0x80
#define MRESET 0x80
#define URESET 0x40
#define NMI 0x20
#define JOYUP 0x10
#define JOYDOWN 0x08
#define JOYLEFT 0x04
#define JOYRIGHT 0x02
#define JOYFIRE 0x01
#define USER1 0x10
#define USER2 0x08
#define USER3 0x04
#define USER4 0x02
#define USER5 0x01
// End of additional signals
// A key can be pressed with up to three key modifiers
// which generates 8 combinations for each key
#define EXT 0x100
#define MD1 0x200
#define MD2 0x400
#define MD3 0x800
#define MAP(pc,sp,rj,mu) { \
rom[(pc)*4] = (((sp)>>8)&0xFF); \
rom[(pc)*4+1] = (((sp))&0xFF); \
rom[(pc)*4+2] = (rj); \
rom[(pc)*4+3] = (mu); \
}
#define MAPANY(pc,sp,rj,mu) { \
MAP(pc,sp,rj,mu); \
MAP(MD1|pc,sp,rj,mu); \
MAP(MD2|pc,sp,rj,mu); \
MAP(MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|pc,sp,rj,mu); \
MAP(MD1|MD3|pc,sp,rj,mu); \
MAP(MD2|MD3|pc,sp,rj,mu); \
MAP(MD1|MD2|MD3|pc,sp,rj,mu); \
}
#define CLEANMAP { \
int i; \
for (i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
rom[i] = 0; \
}
#define SAVEMAPHEX(name) { \
FILE *f; \
int i; \
f=fopen(name,"w"); \
for(i=0;i<(sizeof(rom)/sizeof(rom[0]));i++) \
fprintf(f,"%.2X\n",rom[i]); \
fclose(f); \
}
#define SAVEMAPBIN(name) { \
FILE *f; \
int i; \
f=fopen(name,"wb"); \
fwrite (rom, 1, sizeof(rom), f); \
fclose(f); \
}
// --------------- YOU MAY CUSTOMIZE FROM HERE ------------------------
// Scan code 2 list. First, non localized keys
#define PC_A 0x1C
#define PC_B 0x32
#define PC_C 0x21
#define PC_D 0x23
#define PC_E 0x24
#define PC_F 0x2B
#define PC_G 0x34
#define PC_H 0x33
#define PC_I 0x43
#define PC_J 0x3B
#define PC_K 0x42
#define PC_L 0x4B
#define PC_M 0x3A
#define PC_N 0x31
#define PC_O 0x44
#define PC_P 0x4D
#define PC_Q 0x15
#define PC_R 0x2D
#define PC_S 0x1B
#define PC_T 0x2C
#define PC_U 0x3C
#define PC_V 0x2A
#define PC_W 0x1D
#define PC_X 0x22
#define PC_Y 0x35
#define PC_Z 0x1A
#define PC_0 0x45 // also )
#define PC_1 0x16 // also !
#define PC_2 0x1E // also @
#define PC_3 0x26 // also #
#define PC_4 0x25 // also $
#define PC_5 0x2E // also %
#define PC_6 0x36 // also ^
#define PC_7 0x3D // also &
#define PC_8 0x3E // also *
#define PC_9 0x46 // also (
#define PC_F1 0x05
#define PC_F2 0x06
#define PC_F3 0x04
#define PC_F4 0x0C
#define PC_F5 0x03
#define PC_F6 0x0B
#define PC_F7 0x83
#define PC_F8 0x0A
#define PC_F9 0x01
#define PC_F10 0x09
#define PC_F11 0x78
#define PC_F12 0x07
#define PC_ESC 0x76
#define PC_SPACE 0x29
#define PC_LCTRL 0x14
#define PC_RCTRL 0x14 | EXT
#define PC_LSHIFT 0x12
#define PC_RSHIFT 0x59
#define PC_LALT 0x11
#define PC_RALT 0x11 | EXT
#define PC_LWIN 0x1F | EXT
#define PC_RWIN 0x27 | EXT
#define PC_APPS 0x2F | EXT
#define PC_TAB 0x0D
#define PC_CPSLOCK 0x58
#define PC_SCRLOCK 0x7E
#define PC_INSERT 0x70 | EXT
#define PC_DELETE 0x71 | EXT
#define PC_HOME 0x6C | EXT
#define PC_END 0x69 | EXT
#define PC_PGUP 0x7D | EXT
#define PC_PGDOWN 0x7A | EXT
#define PC_BKSPACE 0x66
#define PC_ENTER 0x5A
#define PC_UP 0x75 | EXT
#define PC_DOWN 0x72 | EXT
#define PC_LEFT 0x6B | EXT
#define PC_RIGHT 0x74 | EXT
#define PC_NUMLOCK 0x77
#define PC_KP_DIVIS 0x4A | EXT
#define PC_KP_MULT 0x7C
#define PC_KP_MINUS 0x7B
#define PC_KP_PLUS 0x79
#define PC_KP_ENTER 0x5A | EXT
#define PC_KP_DOT 0x71
#define PC_KP_0 0x70
#define PC_KP_1 0x69
#define PC_KP_2 0x72
#define PC_KP_3 0x7A
#define PC_KP_4 0x6B
#define PC_KP_5 0x73
#define PC_KP_6 0x74
#define PC_KP_7 0x6C
#define PC_KP_8 0x75
#define PC_KP_9 0x7D
// Localized keyboards usually start to differenciate from here
// Localized keyboard US
#define PC_GRAVEAC 0x0E // also ~
#define PC_MINUS 0x4E // also _
#define PC_EQUAL 0x55 // also +
#define PC_BRAOPEN 0x54 // also {
#define PC_BRACLOS 0x5B // also }
#define PC_BACKSLA 0x5D // also |
#define PC_SEMICOL 0x4C // also :
#define PC_APOSTRO 0x52 // also "
#define PC_COMMA 0x41 // also <
#define PC_DOT 0x49 // also >
#define PC_SLASH 0x4A // also ?
int main()
{
BYTE rom[16384];
CLEANMAP;
MAPANY(PC_LSHIFT,0,0,MODIFIER1); // MD1 is SHIFT
MAPANY(PC_RSHIFT,0,0,MODIFIER1); // MD1 is SHIFT
MAPANY(PC_LCTRL,0,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_RCTRL,0,0,MODIFIER2); // MD2 is CTRL
MAPANY(PC_LALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
MAPANY(PC_RALT,0,JOYFIRE,MODIFIER3); // MD3 is ALT. Also is FIRE for keyboard joystick
MAPANY(PC_LWIN,SP_CAPS,0,0); // CAPS SHIFT
MAPANY(PC_RWIN,SP_SYMBOL,0,0); // SYMBOL SHIFT
// Basic mapping: each key from PC is mapped to a key in the Spectrum
MAP(PC_1,SP_1,0,0);
MAP(PC_2,SP_2,0,0);
MAP(PC_3,SP_3,0,0);
MAP(PC_4,SP_4,0,0);
MAP(PC_5,SP_5,0,0);
MAP(PC_6,SP_6,0,0);
MAP(PC_7,SP_7,0,0);
MAP(PC_8,SP_8,0,0);
MAP(PC_9,SP_9,0,0);
MAP(PC_0,SP_0,0,0);
MAP(PC_Q,SP_Q,0,0);
MAP(PC_W,SP_W,0,0);
MAP(PC_E,SP_E,0,0);
MAP(PC_R,SP_R,0,0);
MAP(PC_T,SP_T,0,0);
MAP(PC_Y,SP_Y,0,0);
MAP(PC_U,SP_U,0,0);
MAP(PC_I,SP_I,0,0);
MAP(PC_O,SP_O,0,0);
MAP(PC_P,SP_P,0,0);
MAP(PC_A,SP_A,0,0);
MAP(PC_S,SP_S,0,0);
MAP(PC_D,SP_D,0,0);
MAP(PC_F,SP_F,0,0);
MAP(PC_G,SP_G,0,0);
MAP(PC_H,SP_H,0,0);
MAP(PC_J,SP_J,0,0);
MAP(PC_K,SP_K,0,0);
MAP(PC_L,SP_L,0,0);
MAP(PC_Z,SP_Z,0,0);
MAP(PC_X,SP_X,0,0);
MAP(PC_C,SP_C,0,0);
MAP(PC_V,SP_V,0,0);
MAP(PC_B,SP_B,0,0);
MAP(PC_N,SP_N,0,0);
MAP(PC_M,SP_M,0,0);
// a letter key with shift (MD1) is like pressing CAPS SHIFT + letter
MAP(MD1|PC_Q,SP_CAPS<<8|SP_Q,0,0);
MAP(MD1|PC_W,SP_CAPS<<8|SP_W,0,0);
MAP(MD1|PC_E,SP_CAPS<<8|SP_E,0,0);
MAP(MD1|PC_R,SP_CAPS<<8|SP_R,0,0);
MAP(MD1|PC_T,SP_CAPS<<8|SP_T,0,0);
MAP(MD1|PC_Y,SP_CAPS<<8|SP_Y,0,0);
MAP(MD1|PC_U,SP_CAPS<<8|SP_U,0,0);
MAP(MD1|PC_I,SP_CAPS<<8|SP_I,0,0);
MAP(MD1|PC_O,SP_CAPS<<8|SP_O,0,0);
MAP(MD1|PC_P,SP_CAPS<<8|SP_P,0,0);
MAP(MD1|PC_A,SP_CAPS<<8|SP_A,0,0);
MAP(MD1|PC_S,SP_CAPS<<8|SP_S,0,0);
MAP(MD1|PC_D,SP_CAPS<<8|SP_D,0,0);
MAP(MD1|PC_F,SP_CAPS<<8|SP_F,0,0);
MAP(MD1|PC_G,SP_CAPS<<8|SP_G,0,0);
MAP(MD1|PC_H,SP_CAPS<<8|SP_H,0,0);
MAP(MD1|PC_J,SP_CAPS<<8|SP_J,0,0);
MAP(MD1|PC_K,SP_CAPS<<8|SP_K,0,0);
MAP(MD1|PC_L,SP_CAPS<<8|SP_L,0,0);
MAP(MD1|PC_Z,SP_CAPS<<8|SP_Z,0,0);
MAP(MD1|PC_X,SP_CAPS<<8|SP_X,0,0);
MAP(MD1|PC_C,SP_CAPS<<8|SP_C,0,0);
MAP(MD1|PC_V,SP_CAPS<<8|SP_V,0,0);
MAP(MD1|PC_B,SP_CAPS<<8|SP_B,0,0);
MAP(MD1|PC_N,SP_CAPS<<8|SP_N,0,0);
MAP(MD1|PC_M,SP_CAPS<<8|SP_M,0,0);
MAPANY(PC_SPACE,SP_SPACE,0,0);
MAPANY(PC_ENTER,SP_ENTER,0,0);
//Complex mapping. This is for the US keyboard although many
//combos can be used with any other PC keyboard
MAPANY(PC_ESC,SP_BREAK,0,0);
MAPANY(PC_CPSLOCK,SP_CPSLOCK,0,0);
MAPANY(PC_TAB,SP_EXTEND,0,0);
MAP(PC_BKSPACE,SP_DELETE,0,0);
MAPANY(PC_UP,SP_UP,0,0);
MAPANY(PC_DOWN,SP_DOWN,0,0);
MAPANY(PC_LEFT,SP_LEFT,0,0);
MAPANY(PC_RIGHT,SP_RIGHT,0,0);
MAPANY(PC_F2,SP_EDIT,0,0);
MAP(PC_F5|MD2|MD3,0,NMI,0); // Ctrl-Alt-F5 for NMI
MAP(PC_F10,SP_GRAPH,0,0); // F10 habilita el modo gráfico. Esto es para Antonio, para la BIOS
MAP(PC_DELETE|MD2|MD3,0,URESET,0); //
MAP(PC_KP_DOT|MD2|MD3,0,URESET,0); // Ctrl-Alt-Del for user reset
MAP(PC_BKSPACE|MD2|MD3,0,MRESET,0); // Ctrl-Alt-BkSpace for master reset
//keypad
MAPANY(PC_KP_DIVIS,SP_SLASH,0,0);
MAPANY(PC_KP_MULT,SP_STAR,0,0);
MAPANY(PC_KP_MINUS,SP_MINUS,0,0);
MAPANY(PC_KP_PLUS,SP_PLUS,0,0);
MAPANY(PC_KP_ENTER,SP_ENTER,0,0);
// a 8-way keyboard joystick on the keypad
MAPANY(PC_KP_7,0,JOYUP|JOYLEFT,0);
MAPANY(PC_KP_8,0,JOYUP,0);
MAPANY(PC_KP_9,0,JOYUP|JOYRIGHT,0);
MAPANY(PC_KP_4,0,JOYLEFT,0);
MAPANY(PC_KP_5,0,JOYDOWN,0);
MAPANY(PC_KP_6,0,JOYRIGHT,0);
MAPANY(PC_KP_1,0,JOYDOWN|JOYLEFT,0);
MAPANY(PC_KP_2,0,JOYDOWN,0);
MAPANY(PC_KP_3,0,JOYDOWN|JOYRIGHT,0);
//Some keys and shift+key mappings for the US keyboard
MAP(MD1|PC_1,SP_BANG,0,0);
MAP(MD1|PC_2,SP_AT,0,0);
MAP(MD1|PC_3,SP_HASH,0,0);
MAP(MD1|PC_4,SP_DOLLAR,0,0);
MAP(MD1|PC_5,SP_PERCEN,0,0);
MAP(MD1|PC_6,SP_CARET,0,0);
MAP(MD1|PC_7,SP_AMP,0,0);
MAP(MD1|PC_8,SP_STAR,0,0);
MAP(MD1|PC_9,SP_PAROPEN,0,0);
MAP(MD1|PC_0,SP_PARCLOS,0,0);
MAP(PC_MINUS,SP_MINUS,0,0);
MAP(MD1|PC_MINUS,SP_UNDERSC,0,0);
MAP(PC_EQUAL,SP_EQUAL,0,0);
MAP(MD1|PC_EQUAL,SP_PLUS,0,0);
MAP(PC_BRAOPEN,SP_BRAOPEN,0,0);
MAP(MD1|PC_BRAOPEN,SP_CUROPEN,0,0);
MAP(PC_BRACLOS,SP_BRACLOS,0,0);
MAP(MD1|PC_BRACLOS,SP_BRACLOS,0,0);
MAP(PC_BACKSLA,SP_BACKSLA,0,0);
MAP(MD1|PC_BACKSLA,SP_PIPE,0,0);
MAP(PC_APOSTRO,SP_APOSTRO,0,0);
MAP(MD1|PC_APOSTRO,SP_QUOTE,0,0);
MAP(PC_COMMA,SP_COMMA,0,0);
MAP(MD1|PC_COMMA,SP_LESS,0,0);
MAP(PC_DOT,SP_DOT,0,0);
MAP(MD1|PC_DOT,SP_GREATER,0,0);
MAP(PC_SLASH,SP_SLASH,0,0);
MAP(MD1|PC_SLASH,SP_QUEST,0,0);
MAP(PC_F12,0,0,USER1); // Evento de usuario 1
MAP(PC_F2|MD2,0,0,USER2); // Evento de usuario 2 = Core 2 (Ctrl+F2)
// End of mapping. Save .HEX file for Verilog
//SAVEMAPHEX("keyb_us_hex.txt");
// And map file for loading from ESXDOS
SAVEMAPBIN("keymaps\\US");
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
call xst -filter iseconfig/filter.filter -intstyle ise -ifn tld_zxuno.xst -ofn tld_zxuno.syr
call ngdbuild -filter iseconfig/filter.filter -intstyle ise -dd _ngo -nt timestamp -uc pines_zxuno.ucf -p xc6slx9-tqg144-2 tld_zxuno.ngc tld_zxuno.ngd
call map -filter iseconfig/filter.filter -intstyle ise -w -ol high -xe n -mt 2 -p xc6slx9-tqg144-2 -logic_opt off -t 1 -xt 0 -register_duplication off -r 4 -global_opt off -ir off -pr off -lc off -power off -o tld_zxuno_map.ncd tld_zxuno.ngd tld_zxuno.pcf
call par -filter iseconfig/filter.filter -intstyle ise -w -ol high -xe n -mt 4 tld_zxuno_map.ncd tld_zxuno.ncd tld_zxuno.pcf
call trce -filter iseconfig/filter.filter -intstyle ise -v 3 -s 2 -n 3 -fastpaths -xml tld_zxuno.twx tld_zxuno.ncd -o tld_zxuno.twr tld_zxuno.pcf -ucf pines_zxuno.ucf
call bitgen -filter iseconfig/filter.filter -intstyle ise -w -g Binary:no -g Compress -g CRC:Enable -g Reset_on_err:No -g ConfigRate:2 -g ProgPin:PullUp -g TckPin:PullUp -g TdiPin:PullUp -g TdoPin:PullUp -g TmsPin:PullUp -g UnusedPin:PullDown -g UserID:0xFFFFFFFF -g ExtMasterCclk_en:Yes -g ExtMasterCclk_divide:50 -g SPI_buswidth:1 -g TIMER_CFG:0xFFFF -g multipin_wakeup:No -g StartUpClk:CClk -g DONE_cycle:4 -g GTS_cycle:5 -g GWE_cycle:6 -g LCK_cycle:NoWait -g Security:None -g DonePipe:No -g DriveDone:No -g en_sw_gsr:No -g drive_awake:No -g sw_clk:Startupclk -g sw_gwe_cycle:5 -g sw_gts_cycle:4 tld_zxuno.ncd
call xst -intstyle ise -ifn tld_zxuno.xst -ofn tld_zxuno.syr
call ngdbuild -intstyle ise -dd _ngo -nt timestamp -uc pines_zxuno.ucf -p xc6slx9-tqg144-2 tld_zxuno.ngc tld_zxuno.ngd
call map -intstyle ise -w -ol high -xe n -mt 2 -p xc6slx9-tqg144-2 -logic_opt off -t 1 -xt 0 -register_duplication off -r 4 -global_opt off -ir off -pr off -lc off -power off -o tld_zxuno_map.ncd tld_zxuno.ngd tld_zxuno.pcf
call par -intstyle ise -w -ol high -xe n -mt 4 tld_zxuno_map.ncd tld_zxuno.ncd tld_zxuno.pcf
call trce -intstyle ise -v 3 -s 2 -n 3 -fastpaths -xml tld_zxuno.twx tld_zxuno.ncd -o tld_zxuno.twr tld_zxuno.pcf -ucf pines_zxuno.ucf
call bitgen -intstyle ise -w -g Binary:no -g Compress -g CRC:Enable -g Reset_on_err:No -g ConfigRate:2 -g ProgPin:PullUp -g TckPin:PullUp -g TdiPin:PullUp -g TdoPin:PullUp -g TmsPin:PullUp -g UnusedPin:PullDown -g UserID:0xFFFFFFFF -g ExtMasterCclk_en:Yes -g ExtMasterCclk_divide:50 -g SPI_buswidth:1 -g TIMER_CFG:0xFFFF -g multipin_wakeup:No -g StartUpClk:CClk -g DONE_cycle:4 -g GTS_cycle:5 -g GWE_cycle:6 -g LCK_cycle:NoWait -g Security:None -g DonePipe:No -g DriveDone:No -g en_sw_gsr:No -g drive_awake:No -g sw_clk:Startupclk -g sw_gwe_cycle:5 -g sw_gts_cycle:4 tld_zxuno.ncd

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
org 0
di
ld sp,32768
ld hl,Codigo
ld de,16384
ld bc,LCodigo
Espera1: in a,(255)
cp 255
jr nz,Espera1
Espera2: in a,(255)
cp 255
jr z,Espera2
ldir
Otra: call 16384
jp Otra
Codigo: in a,(255)
cp 255
jr z,Codigo
out (254),a
out (254),a
nop
out (254),a
out (254),a
nop
ld bc,40feh
out (c),a
out (c),a
out (c),a
out (c),a
out (c),a
out (c),a
dec c
out (c),a
out (c),a
out (c),a
out (c),a
out (c),a
out (c),a
ret
LCodigo equ $-Codigo
end

Binary file not shown.

View File

@ -1,78 +0,0 @@
F3
31
00
80
21
21
00
11
00
40
01
2D
00
DB
FF
FE
FF
20
FA
DB
FF
FE
FF
28
FA
ED
B0
CD
00
40
C3
1B
00
DB
FF
FE
FF
28
FA
D3
FE
D3
FE
00
D3
FE
D3
FE
00
01
FE
40
ED
79
ED
79
ED
79
ED
79
ED
79
ED
79
0D
ED
79
ED
79
ED
79
ED
79
ED
79
ED
79
C9

Binary file not shown.

Binary file not shown.

View File

@ -1,84 +0,0 @@
org 28000
Main di
ld bc,7ffdh
ld a,16+6 ;pagina 6 de RAM
out (c),a
ld hl,Rom
ld de,0c000h ;Copiar ROM NMI a esta dirección
ld bc,LRom
ldir
ld bc,7ffdh
ld a,16 ;Restablecemos página 0 de RAM
out (c),a
ei
ret
Rom ;Esto se ejecuta a partir de C000h.
;Guardar puntero de pila, establecer pila privada y guardar registros
ld (OldSP-Rom+0c000h),sp
ld sp,Stack-Rom+0c000h
push af
push bc
push de
push hl
;Salvaguarda zona de atributos
ld hl,22528
ld de,Buffer-Rom+0c000h
ld bc,768
ldir
;Pon el banner de PAUSE
ld hl,Banner-Rom+0c000h
ld de,22528+32*8+1
ld b,7
BucBanner push bc
ld bc,29
ldir
inc de
inc de
inc de
pop bc
djnz BucBanner
;Espera una tecla para terminar pausa
BucWaitKey xor a
in a,(254)
and 31
cp 31
jr z,BucWaitKey
;Restaura zona de atributos
ld hl,Buffer-Rom+0c000h
ld de,22528
ld bc,768
ldir
;Restablecer registros y puntero de pila anterior
pop hl
pop de
pop bc
pop af
ld sp,(OldSP-Rom+0c000h)
;Saltar a direccion de fin de NMI
jp 0069h
Banner db 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
db 000,255,255,255,000,000,000,255,255,255,000,000,255,000,000,000,255,000,000,255,255,255,000,000,255,255,255,255,000
db 000,255,000,000,255,000,255,000,000,000,255,000,255,000,000,000,255,000,255,000,000,000,000,000,255,000,000,000,000
db 000,255,255,255,000,000,255,255,255,255,255,000,255,000,000,000,255,000,000,255,255,255,000,000,255,255,255,255,000
db 000,255,000,000,000,000,255,000,000,000,255,000,255,000,000,000,255,000,000,000,000,000,255,000,255,000,000,000,000
db 000,255,000,000,000,000,255,000,000,000,255,000,000,255,255,255,000,000,000,255,255,255,000,000,255,255,255,255,000
db 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
OldSP dw 0
ds 16 ;16 bytes de pila
Stack equ $
Buffer equ $
LRom equ $-Rom
end Main

View File

@ -1,185 +0,0 @@
ZXUNOREGADDR equ 0fc3bh
ZXUNOREGDATA equ 0fd3bh
MASTERCONF equ 0
MASTERMAPPER equ 1
FLASHSPI equ 2
FLASHCS equ 3
; Selecciona un registro ZXUno de forma que los siguientes IN/OUTs a (C)
; se hagan en el registro deseado
select macro dir
ld bc,ZXUNOREGADDR
ld a,dir
out (c),a
inc b
endm
; Escribe "dato" en el registro ZXUno de direccion "dir"
wreg macro dir,dato
ld bc,ZXUNOREGADDR
ld a,dir
out (c),a
inc b
ld a,dato
out (c),a
endm
; Lee un byte desde el registro ZXUno cuya dirección es "dir" y lo almacena en "dest" (un registro de 8 bits)
rreg macro dir,dest
ld bc,ZXUNOREGADDR
ld a,dir
out (c),a
inc b
in dest,(c)
endm
;--------------------------------------------------------------------------
org 32768
Main di
ld sp,49151 ;stack fuera de la pagina de memoria que tocaremos
; Borramos la pantalla shadow, ya que Open SE IV parece que no la borra
wreg MASTERMAPPER,7 ;paginamos la pantalla shadow
call BorraBloque
; Elige uno, para probar
;------------------------------------------------- ROM de 48K con DIVMMC (se copia la interna)
wreg MASTERMAPPER,11 ;Donde estaría la ROM 3
ld hl,0
ld de,49152
ld bc,16384
ldir
ld bc,1ffdh
ld a,2
out (c),a
ld b,7fh
ld a,10h
out (c),a
call CopiaESXDOS
wreg MASTERCONF,010b ;Fin del modo boot. La nueva ROM está en su sitio y activada. DIVMMC está activado.
jp 0 ;Vamonos a ella.
;------------------------------------------------- ROM del +3 con DIVMMC
; call CopiaPlus3
; call CopiaESXDOS
; wreg MASTERCONF,2 ;Fin del modo boot. La nueva ROM está en su sitio y activada. DIVMMC está activado
; jp 0 ;Vamonos a ella.
;------------------------------------------------- ROM SE IV con DIVMMC, sin NMI en DIVMMC
; call CopiaOpenSE
; ld bc,1ffdh
; ld a,2
; out (c),a
; ld b,7fh
; ld a,10h
; out (c),a
; call CopiaESXDOS
; wreg MASTERCONF,110b ;Fin del modo boot. La nueva ROM está en su sitio y activada. DIVMMC está activado pero sin NMI
; jp 0 ;Vamonos a ella.
;-------------------------------------------------
CopiaESXDOS wreg MASTERMAPPER,16 ;Borramos los 128KB de la RAM del DIVMMC (bancos 16 a 23)
call BorraBloque
wreg MASTERMAPPER,17
call BorraBloque
wreg MASTERMAPPER,18
call BorraBloque
wreg MASTERMAPPER,19
call BorraBloque
wreg MASTERMAPPER,20
call BorraBloque
wreg MASTERMAPPER,21
call BorraBloque
wreg MASTERMAPPER,22
call BorraBloque
wreg MASTERMAPPER,23
call BorraBloque
wreg MASTERMAPPER,12 ;En los primeros 8KB del bloque 12 está la ROM del DIVMMC (ESXDOS)
wreg FLASHCS,0 ;linea CS de la flash a nivel bajo. Necesario antes de emitir comandos SPI
wreg FLASHSPI,3 ;comando de lectura de la flash
ld a,04h ;
out (c),a ; Dirección donde se encuentra
ld a,80h ; la ROM del ESXDOS en la flash: 048000h
out (c),a ;
ld a,00h ;
out (c),a ; A partir de aqui leemos secuencialmente
in a,(c) ; Primera lectura que se descarta...
ld hl,49152
ld de,8192 ; son solo 8K a copiar
call BucCopia
wreg FLASHCS,1
ret
CopiaPlus3 wreg MASTERMAPPER,8 ;primera página de RAM que se convertirá en ROM (la 8)
wreg FLASHCS,0 ;linea CS de la flash a nivel bajo. Necesario antes de emitir comandos SPI
wreg FLASHSPI,3 ;comando de lectura de la flash
ld a,03h ;
out (c),a ; Dirección donde se encuentra
ld a,00h ; la ROM en la flash: 030000h
out (c),a ;
ld a,00h ;
out (c),a ; A partir de aqui leemos secuencialmente
in a,(c) ; Primera lectura que se descarta...
call CopiaBloque ;copia 16K de la flash a la página 8
wreg MASTERMAPPER,9
select FLASHSPI
call CopiaBloque ;copia 16K de la flash a la página 9
wreg MASTERMAPPER,10
select FLASHSPI
call CopiaBloque ;etc...
wreg MASTERMAPPER,11
select FLASHSPI
call CopiaBloque
wreg FLASHCS,1 ;Deseleccionar flash
ret
CopiaOpenSE wreg MASTERMAPPER,11 ;Solo copiamos la ROM 1 de la SE Basic, como ROM 3.
wreg FLASHCS,0 ;linea CS de la flash a nivel bajo
wreg FLASHSPI,3 ;comando de lectura de la flash
ld a,04h ;
out (c),a ; Dirección donde se encuentra
ld a,40h ; la ROM en la flash: 044000h
out (c),a ;
ld a,00h ;
out (c),a ; A partir de aqui leemos secuencialmente
in a,(c) ; Primera lectura que se descarta...
call CopiaBloque
wreg FLASHCS,1 ;Deseleccionar flash
ret
CopiaBloque ld hl,49152
ld de,16384
BucCopia in a,(c) ;leemos de la flash...
ld (hl),a ;...a memoria
inc hl
dec de
ld a,d
or e
jr nz,BucCopia
ret
BorraBloque ld hl,49152
ld de,49153
ld bc,16383
ld (hl),l
ldir
ret
end Main

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -6,21 +6,32 @@ vhdl work "T80.vhd"
vhdl work "YM2149_linmix.vhd"
vhdl work "T80a.vhd"
verilog work "spi.v"
verilog work "scancode_to_speccy.v"
verilog work "rom.v"
verilog work "pal_sync_generator_sinclair.v"
vhdl work "mapa_teclado_es.vhd"
verilog work "ps2_port.v"
verilog work "ps2mouse_to_kmouse.v"
verilog work "pll_drp.v"
verilog work "pal_sync_generator.v"
verilog work "lut.v"
verilog work "dp_memory.v"
verilog work "zxunoregs.v"
verilog work "ula_radas.v"
verilog work "tv80_to_t80_wrapper.v"
verilog work "turbosound.v"
vhdl work "ps2k_mcleod.vhd"
verilog work "scratch_register.v"
verilog work "scandoubler_ctrl.v"
verilog work "ps2_mouse_kempston.v"
verilog work "ps2_keyb.v"
verilog work "pll_top.v"
verilog work "nmievents.v"
verilog work "multiboot.v"
verilog work "memory.v"
verilog work "joystick_protocols.v"
verilog work "flash_spi.v"
verilog work "coreid.v"
verilog work "control_rasterint.v"
verilog work "audio_management.v"
verilog work "zxuno.v"
verilog work "relojes_pll.v"
verilog work "vga_scandoubler.v"
verilog work "cuatro_relojes.v"
verilog work "tld_zxuno.v"

View File

@ -1,19 +1,18 @@
set -tmpdir "xst/projnav.tmp"
set -tmpdir "projnav.tmp"
set -xsthdpdir "xst"
run
-ifn tld_zxuno.prj
-ifmt mixed
-infer_ramb8 No
-ofn tld_zxuno
-ofmt NGC
-p xc6slx9-3-tqg144
-p xc6slx9-2-tqg144
-top tld_zxuno
-opt_mode Speed
-opt_level 2
-opt_level 1
-power NO
-iuc NO
-lso tld_zxuno.lso
-keep_hierarchy NO
-netlist_hierarchy as_optimized
-keep_hierarchy No
-netlist_hierarchy As_Optimized
-rtlview Yes
-glob_opt AllClockNets
-read_cores YES
@ -21,25 +20,24 @@ run
-cross_clock_analysis NO
-hierarchy_separator /
-bus_delimiter <>
-case maintain
-case Maintain
-slice_utilization_ratio 100
-bram_utilization_ratio 100
-dsp_utilization_ratio 100
-lc auto
-reduce_control_sets auto
-fsm_extract YES -fsm_encoding Auto
-safe_implementation No
-fsm_style lut
-lc Auto
-reduce_control_sets Auto
-fsm_extract NO
-fsm_style LUT
-ram_extract Yes
-ram_style Auto
-rom_extract Yes
-shreg_extract YES
-rom_style Auto
-auto_bram_packing NO
-resource_sharing NO
-resource_sharing YES
-async_to_sync YES
-shreg_min_size 2
-use_dsp48 auto
-use_dsp48 Auto
-iobuf YES
-max_fanout 100000
-bufg 16
@ -49,6 +47,6 @@ run
-use_clock_enable Auto
-use_sync_set Auto
-use_sync_reset Auto
-iob auto
-iob Auto
-equivalent_register_removal YES
-slice_utilization_ratio_maxmargin 5