Contents

Background

The Mega Everdrive X and Pro series of flash cartridges by Krikzz have some very powerful features, known as SSF extensions. These extensions are activated by setting the system type ROM header field (at 0x100) to SEGA SSF (instead of the usual SEGA GENESIS or SEGA MEGA DRIVE).

These extensions provide features including memory bank mapping, advanced math operations, USB and SD IO.

However, not all models provide the same features in the same way. For example, in order to read or write to SRAM on the X7 you need to switch a region of memory to bank 31. The upper 256 KB of this region then maps to SRAM. However, on the Pro, the entire 512 KB region maps to SRAM. In addition to differences in the SRAM bank, the USB IO operates differently between the X and Pro series. The X-series provides a relatively simple UART R/W mechanism via dedicated registers (0xA130E2 and 0xA130E4). However, on the Pro, you need to use 0xA130D0 and 0xA130D2, and wrap any data you want to send or receive in a specific message format.

If you make use of either of these features and want to support the full range of Everdrives, you’ll need to be able to detect their models and act accordingly!

Detecting the Everdrive X-series

The best way I’ve found to conclusively detect the X-series is to look at the value of the IO status register:

#define REG_IO_STATUS 0xA130E4

u16 io_stat = *((*vu16)REG_IO_STATUS);

The value of this register varies according to emulator and Everdrive models. Here’s some I’ve come across:

io_stat Hardware / Emulator Context
0x3F00 OpenEmu v2.4.1  
0x3F00 Exodus  
0x3F00 Regen v0.97d  
0xFFFF Fusion 3.6.4  
0x3F00 BlastEm nightly (0.6.3-pre-4c418ee9a9d8)  
0x3014/5 BlastEm nightly (0.6.3-pre)  
0x4003 Everdrive X7 Idle with USB connected
0x4009 Everdrive X7 Idle, loaded via SDHC, without USB connected
0x4003 Everdrive X7 Idle, loaded via SDHC, with USB connected
0x0009 Everdrive X7 Idle, loaded via SD, without USB connected
0x0003 Everdrive X7 Idle, loaded via SD, with USB connected
0x3F00 Everdrive Pro  

From these values, it seems the best way to detect the X-series is to check the upper 8 bits of io_stat and check if it’s 0x40 or 0x00 (the key difference between these two values being if the SD card type is SDHC or SD).

u8 upper_io_stat = io_stat >> 8;
bool is_everdrive_x_series = upper_io_stat == 0x40 || upper_io_stat == 0x00;

It should be noted that since I only own the X7 model of this series, I’m not 100% certain the above detection method works with X3 and X5 models. If you know, please let me know and I can update this post!

Detecting the Everdrive Pro

The Pro model is a bit easier to detect. The upper 12-bits of the system status register can be checked as follows:

#define REG_SYS_STAT 0xA130D4

u16 sys_stat = *((*vu16)REG_SYS_STAT);
bool is_everdrive_pro = (sys_stat & 0xFFF0) == 0x55A0;

Other Everdrive models

I’ve no experience with the older “v1” Everdrive, but judging from the documentation, it seems the X-series detection method might also work for the v1 models.

The new 2025 Core model seems to be based on the Pro. However, I don’t have this model either so cannot confirm either way. If you know, let me know and I can update this post!

References