Skip to content

Commit a30d521

Browse files
committed
VERSION 5.2
Merge branch 'V5.2' into 'master'
2 parents c78362f + fc56d79 commit a30d521

23 files changed

+764
-216
lines changed

AUTHORS

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
Commodore 64 for MEGA65 aka C64MEGA65
22
=====================================
33

4-
done in 2024 by
4+
done in 2025 by
55
* MJoergen github.com/MJoergen
66
* sy2002 github.com/sy2002 www.sy2002.de
77

8-
C64MEGA65 is licensed under the terms of GNU/GPL v3, for more information please read the file LICENSE.
9-
Parts of C64MEGA65 are licensed under other Free-software licenses as described in the source code.
8+
C64MEGA65 is licensed under the terms of GNU/GPL v3, for more information
9+
please read the file LICENSE. Parts of C64MEGA65 are licensed under other
10+
Free-software licenses as described in the source code.
1011

11-
Very special thanks to AmzokPhase101 for very patiently and with great thoroughness performing
12-
a lot of tests plus the most intense "demo marathon" series regression tests.
13-
The results of the "demo marathon" tests are documented in tests/demos.md.
12+
Very special thanks to AmzokPhase101 for very patiently and with great
13+
thoroughness performing a lot of tests plus the most intense "demo marathon"
14+
series regression tests. The results of the "demo marathon" tests are
15+
documented in tests/demos.md.
1416

1517
Special thanks for countless hours of testing, sparring, advise and other
1618
valuable support (in alphabetical order): adtbm, deft & lydon
1719

1820
Special thanks to Daniel Mantione for helping us to support the EasyFlash 1CR
1921

20-
Special thanks to Thomas 'skoe' Giesel for helping us to support the EasyFlash 3
21-
and to the whole EasyFlash team (https://skoe.de/easyflash/aboutus/) for creating
22-
this wonderful cartridge which became a movement
22+
Special thanks to Thomas 'skoe' Giesel for helping us to support the
23+
EasyFlash 3 and to the whole EasyFlash team (https://skoe.de/easyflash/aboutus/)
24+
for creating this wonderful cartridge which became a movement
2325

2426
Special thanks to dbf for supporting us in navigating all questions related
25-
to the MEGA65's PCB and its circuitry.
27+
to the MEGA65's PCB and its circuitry
2628

27-
Special thanks to sho3string for helping us to understand retro cathode ray tube monitors
28-
and for writing the dedicated documentation doc/retrotubes.md
29+
Special thanks to sho3string for helping us to understand retro cathode ray
30+
tube monitors and for writing the dedicated documentation doc/retrotubes.md
2931

30-
Special thanks to Adam Barnes for not only creating the most awesome Open Source HDMI core on the
31-
planet (see below) but also for patiently sharing his wisdom and tirelessly supporting us in improving
32+
Special thanks to Adam Barnes for not only creating the most awesome Open
33+
Source HDMI core on the planet (see below) but also for patiently sharing his
34+
wisdom and tirelessly supporting us in improving our HyperRAM controller
35+
36+
Special thanks to Antti Lukats/Trenz Electronic for helping us to stabilize
3237
our HyperRAM controller
3338

34-
Special thanks to Antti Lukats/Trenz Electronic for helping us to stabilize our HyperRAM controller
39+
Thanks to Carsten Elton Sørensen (csoren) for adding simulated cartridge
40+
support (.crt) for COMAL 80, Simons BASIC, Waterloo Structured BASIC,
41+
Mikro Assembler and BMP-Data Turbo 2000.
3542

3643
C64MEGA65:
3744
----------

CORE/CORE-R6.xpr

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- -->
44
<!-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved. -->
55

6-
<Project Version="7" Minor="61" Path="/media/psf/Home/Documents/Privat/GNR/dev/MEGA65/C64MEGA65/CORE/CORE-R6.xpr">
6+
<Project Version="7" Minor="61" Path="/home/mike/git/MJoergen/C64MEGA65/CORE/CORE-R6.xpr">
77
<DefaultLaunch Dir="$PRUNDIR"/>
88
<Configuration>
99
<Option Name="Id" Val="926450cd97ce43fe9c0a128c0d719455"/>
@@ -1010,9 +1010,7 @@
10101010
<Runs Version="1" Minor="19">
10111011
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a200tfbg484-2" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
10121012
<Strategy Version="1" Minor="2">
1013-
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2019">
1014-
<Desc>Vivado Synthesis Defaults</Desc>
1015-
</StratHandle>
1013+
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2019"/>
10161014
<Step Id="synth_design" PreStepTclHook="$PPRDIR/m2m-rom/synth_pre.tcl">
10171015
<Option Id="FlattenHierarchy">1</Option>
10181016
</Step>
@@ -1024,9 +1022,7 @@
10241022
</Run>
10251023
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a200tfbg484-2" ConstrsSet="constrs_1" Description="Includes alternate algorithms for timing-driven optimization" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1">
10261024
<Strategy Version="1" Minor="2">
1027-
<StratHandle Name="Performance_ExtraTimingOpt" Flow="Vivado Implementation 2022">
1028-
<Desc>Includes alternate algorithms for timing-driven optimization</Desc>
1029-
</StratHandle>
1025+
<StratHandle Name="Performance_ExtraTimingOpt" Flow="Vivado Implementation 2022"/>
10301026
<Step Id="init_design"/>
10311027
<Step Id="opt_design"/>
10321028
<Step Id="power_opt_design"/>

CORE/vhdl/cartridge.vhd

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,20 @@ begin
193193
iof_ena <= '1';
194194
end if;
195195

196+
when 4 =>
197+
-- Simons BASIC
198+
-- One low 8k bank, one upper 8k bank which is enabled or disabled
199+
-- by reading or writing the IO area respectively
200+
if ioe_i = '1' then
201+
game_o <= not wr_en_i;
202+
end if;
203+
if cart_loading_i = '1' then
204+
game_o <= '0';
205+
exrom_o <= '0';
206+
bank_lo_o <= (others => '0');
207+
bank_hi_o <= (others => '0');
208+
end if;
209+
196210
when 5 =>
197211
-- Ocean Type 1 - (game=0, exrom=0, 128k,256k or 512k in 8k banks)
198212
-- BANK is written to lower 6 bits of $DE00 - bit 8 is always set
@@ -284,6 +298,50 @@ begin
284298
bank_hi_o <= (others => '0');
285299
end if;
286300

301+
when 21 =>
302+
-- COMAL 80 - (game=0, exrom=0 = 4 16k banks)
303+
if ioe_i = '1' and wr_en_i = '1' then
304+
bank_lo_o <= "00000" & wr_data_i(1 downto 0);
305+
bank_hi_o <= "00000" & wr_data_i(1 downto 0);
306+
exrom_o <= wr_data_i(6);
307+
game_o <= wr_data_i(6);
308+
end if;
309+
if cart_loading_i = '1' then
310+
game_o <= '0';
311+
exrom_o <= '0';
312+
cart_disable <= '0';
313+
bank_lo_o <= (others => '0');
314+
bank_hi_o <= (others => '0');
315+
end if;
316+
317+
when 22 =>
318+
-- Waterloo Structured BASIC (game=1, exrom=0, two 8k banks)
319+
if ioe_i = '1' then
320+
bank_lo_o <= "000000" & addr_i(1);
321+
exrom_o <= addr_i(0);
322+
end if;
323+
if cart_loading_i = '1' then
324+
game_o <= '1';
325+
exrom_o <= '0';
326+
bank_lo_o <= (others => '0');
327+
bank_hi_o <= (others => '0');
328+
end if;
329+
330+
when 28 =>
331+
-- Mikro Assembler - (game=1, exrom=0, one 8k bank, $9e00-$9fff
332+
-- mirrored at $de00-$dfff)
333+
if cart_loading_i = '1' then
334+
game_o <= '1';
335+
exrom_o <= '0';
336+
cart_disable <= '0';
337+
bank_lo_o <= (others => '0');
338+
bank_hi_o <= (others => '0');
339+
ioe_wr_ena_o <= '0';
340+
iof_wr_ena_o <= '0';
341+
ioe_ena <= '1';
342+
iof_ena <= '1';
343+
end if;
344+
287345
when 32 =>
288346
-- EASYFLASH - 1mb 128x8k/64x16k, XBank format(33) looks the same
289347
-- upd: original Easyflash(32) boots in ultimax mode.
@@ -321,6 +379,24 @@ begin
321379
bank_lo_o <= (others => '0');
322380
end if;
323381

382+
when 83 =>
383+
-- BMP-Data Turbo 2000, (game=0, exrom=0, one 16k bank)
384+
if wr_en_i = '1' then
385+
if ioe_i = '1' then
386+
game_o <= '0';
387+
exrom_o <= '0';
388+
elsif iof_i = '1' then
389+
game_o <= '1';
390+
exrom_o <= '1';
391+
end if;
392+
end if;
393+
if cart_loading_i = '1' then
394+
game_o <= '0';
395+
exrom_o <= '0';
396+
bank_lo_o <= (others => '0');
397+
bank_hi_o <= (others => '0');
398+
end if;
399+
324400
when others =>
325401
null;
326402
end case;

CORE/vhdl/config.vhd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ type WHS_RECORD_ARRAY_TYPE is array (0 to WHS_RECORDS - 1) of WHS_RECORD_TYPE;
7777

7878
constant SCR_WELCOME : string :=
7979

80-
"\n Commodore 64 for MEGA65 Version 5.1\n\n" &
80+
"\n Commodore 64 for MEGA65 Version 5.2\n\n" &
8181

8282
" MiSTer port 2024 by MJoergen & sy2002\n" &
8383
" Powered by MiSTer2MEGA65\n\n\n" &
@@ -97,13 +97,14 @@ constant SCR_WELCOME : string :=
9797

9898
constant HELP_1 : string :=
9999

100-
"\n Commodore 64 for MEGA65 Version 5.1\n\n" &
100+
"\n Commodore 64 for MEGA65 Version 5.2\n\n" &
101101

102102
" MiSTer port 2024 by MJoergen & sy2002\n" &
103103
" Powered by MiSTer2MEGA65\n\n" &
104104

105105
" Quickstart:\n\n" &
106106

107+
" * Read the docs: https://c64.mega65.org\n" &
107108
" * Create a /c64 folder on your SD card &\n" &
108109
" place your D64, CRT and PRG files there\n" &
109110
" * You can work with long file names and\n" &
@@ -128,7 +129,7 @@ constant HELP_1 : string :=
128129

129130
constant HELP_2 : string :=
130131

131-
"\n Commodore 64 for MEGA65 Version 5.1\n\n" &
132+
"\n Commodore 64 for MEGA65 Version 5.2\n\n" &
132133

133134
" When browsing the menu:\n\n" &
134135

@@ -159,7 +160,7 @@ constant HELP_2 : string :=
159160

160161
constant HELP_3 : string :=
161162

162-
"\n Commodore 64 for MEGA65 Version 5.1\n\n" &
163+
"\n Commodore 64 for MEGA65 Version 5.2\n\n" &
163164

164165
" SID:\n\n" &
165166

@@ -304,7 +305,7 @@ constant SEL_CORENAME : std_logic_vector(15 downto 0) := x"0200";
304305

305306
-- Currently this is only used in the debug console. Use the welcome screen and the
306307
-- help system to display the name and version of your core to the end user
307-
constant CORENAME : string := "Commodore 64 for MEGA65 Version 5.1";
308+
constant CORENAME : string := "Commodore 64 for MEGA65 Version 5.2";
308309

309310
--------------------------------------------------------------------------------------------------------------------
310311
-- "Help" menu / Options menu (Selectors 0x0300 .. 0x0312): DO NOT TOUCH

CORE/vhdl/main.vhd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ begin
937937
-- Ultimax mode and VIC accesses the bus: we need to translate the address, see comment about "The PLA Dissected" above
938938
crt_addr_bus_o <= "11" & c64_ram_addr_o(13 downto 0);
939939
end if;
940-
core_nmi_n <= not crt_nmi;
940+
core_nmi_n <= (not crt_nmi) and restore_key_n;
941941

942942
when others =>
943943
null;

0 commit comments

Comments
 (0)