Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > EF3 extra control registers
2019-05-23 16:20
oziphantom

Registered: Oct 2014
Posts: 478
EF3 extra control registers

Given you can program a broken EF3 from BASIC without it being in its menu, it stand to reason that you can access the Cart from BASIC.

Does anybody know the trick to doing it?

I've found DE0F is the mode register, DE01 is the slot register. But setting DE0F to 0 or 1 doesn't get me any response from the cart.

Is there a way to get it to respond again?
2019-05-23 18:34
Krill

Registered: Apr 2002
Posts: 2825
Quoting oziphantom
I've found DE0F is the mode register, DE01 is the slot register.
Not sure i understand you right, but this document https://skoe.de/easyflash/files/devdocs/EasyFlash-ProgRef.pdf disagrees with your findings.
2019-05-23 19:02
oziphantom

Registered: Oct 2014
Posts: 478
DE00 = BANK
DE01 = SLOT - aka which EF Cart you want
DE02 = Control - aka 8K 16K enabled etc
...
DE0F = Mode - KERNAL replace, Freezer cart etc (I think, from looking at menu src code)

I think USB write is DE08 and read is DE09 but don't quote me

The Menu has to be able to change such things, otherwise it would be impossible to use the slots. The menu's code runs on the C64 unlike say the 1541U-II so it must be possible to change it through the DEXX interface.

The menu probably doesn't need to set up anything special as if Slot 0 get trashed and hence the cart won't boot at all you can program the cart from loading a program off disk, so the slot, mode and program registers must be visible??
2019-05-23 21:00
Krill

Registered: Apr 2002
Posts: 2825
I located the mentioned IO registers (cartridge mode, slot, USB-ID/status/data and others) in the VHDL source files, but they depend on current cartridge mode. Some are active only in this mode, others only in that mode.

What exactly do you want to achieve?
2019-05-24 07:05
oziphantom

Registered: Oct 2014
Posts: 478
I want to be able to control the EF cart, such that I can choose a slot and make the ROM visible at $8000/$c000 from 128 mode. Once you get to 128 mode, all that is needed is for the Cart to "wake up" and respond to commands.

Having it so you can change slots mid game, breaking the 1MB barrier might be nice as well.
2019-05-24 08:54
oziphantom

Registered: Oct 2014
Posts: 478
    ---------------------------------------------------------------------------
    -- Register $de0f selects the cartridge mode when enable_menu is set.
    ---------------------------------------------------------------------------
    check_cartridge_mode: process(clk, n_sys_reset)
    begin
        if n_sys_reset = '0' then
            enable_menu     <= '1';
            cart_mode       <= MODE_EF;
            sw_start_reset  <= '0';
        elsif rising_edge(clk) then
            sw_start_reset  <= '0';

            if start_reset_to_menu = '1' then
                enable_menu     <= '1';
                cart_mode       <= MODE_EF;
                sw_start_reset  <= '1';

            elsif wp = '1' and io1_addr_0x = '1' and enable_menu = '1' then
                -- $de0f = cartridge mode
                if addr(3 downto 0) = x"f" then
                    enable_menu     <= '0';
                    cart_mode       <= data(2 downto 0);
                    sw_start_reset  <= '1';

                    if data(2 downto 0) = MODE_EF_NO_RESET then
                        -- without reset, hide this register only
                        sw_start_reset <= '0';
                    end if;
                end if;
            end if;
        end if;
    end process;


So the trick we be to somehow get enable_menu back to '1' but keep 128 mode... which looks to be impossible.
2019-05-24 09:17
Krill

Registered: Apr 2002
Posts: 2825
I'm not sure i understand, but i have a hunch that it's not possible to do what you want to do. The following is all from looking at the source code and may have errors.

Cartridge mode control ($de0f) and many other registers seem to be available only in menu mode, to which the cart boots after power-up.
Once you select an image and tell the menu to reset to Easyflash, utility cartridge or any of the other modes via $de0f, that $de0f register vanishes and only the specific set of registers depending on cartridge mode is available.

You cannot get back to menu mode from software only, this requires hardware intervention, i.e., pressing a cartridge button.

In EF mode, however, it appears that the slot register at $de01 is active, so there might not be a 1 MB barrier.

As for C-128 mode, i don't quite know how it differs from C-64 mode, and how EF supports it.
2019-05-24 09:52
oziphantom

Registered: Oct 2014
Posts: 478
128 mode clears go64 which disables the Game line, then it does a reset. Thus the 128 won't see anything on Game/Exrom and boots as per normal.
    check_c64_mode: process(clk)
    begin
        if rising_edge(clk) then
            if start_reset = '1' then
                n_game_i <= not go_64;
            elsif n_romh = '0' and n_generated_reset_i = '1' then
                n_game_i <= '1';
            end if;
        end if;
    end process;


If one could get the go64 mode toggle and EF_MODE then it would probably work(with a custom menu), but they both share the same register and it can't be two values at once. In short it needs a new CPLD program.

unless if the ROM is still visible on IO1/IO2 during MODE128s' reset.. at which point a 128 Cart header in the upper bank might be found and booted... But its academic as you will still be locked out of the carts registers...
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
St0rmfr0nt/Quantum
Higgie/Kraze/Onslaught
JackAsser/Booze Design
Alakran_64
CA$H/TRiAD
psych
fox/bonzai
wil
Guests online: 75
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.5)
2 Black Beard  (9.4)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Irata  (8.5)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.