Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums

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

Registered: Oct 2014
Posts: 317
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

Registered: Apr 2002
Posts: 1229
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

Registered: Oct 2014
Posts: 317
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

Registered: Apr 2002
Posts: 1229
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

Registered: Oct 2014
Posts: 317
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

Registered: Oct 2014
Posts: 317
    -- Register $de0f selects the cartridge mode when enable_menu is set.
    check_cartridge_mode: process(clk, n_sys_reset)
        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

Registered: Apr 2002
Posts: 1229
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

Registered: Oct 2014
Posts: 317
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)
        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
Users Online
Francesco Sblendorio
Guests online: 44
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 X Marks the Spot  (9.5)
9 Wonderland XII  (9.5)
10 OMG Got Balls!  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.5)
2 Instinct  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.4)
5 Crystal Gazer  (9.4)
6 Rewind  (9.4)
7 Pandemoniac Part 2 o..  (9.4)
8 Bad Boy  (9.4)
9 The Earth  (9.4)
10 Official X2018 Report  (9.4)
Top Groups
1 Fossil  (9.6)
2 PriorArt  (9.6)
3 Oxyron  (9.4)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Hardware-Gurus
1 Soci  (9.9)
2 Grue  (9.8)
3 Zer0-X  (9.8)
4 Wiesel  (9.8)
5 Lemming  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.05 sec.