Skip to content

args not passed to elf_main #29

Closed
Closed
@ZacharyScolaro

Description

@ZacharyScolaro

When loading an elf rom the elf_main() function should be passed an array of uint32_t that specifies the system type, clock rate, and feature flags.

See UCA firmware for an example here: https://github.com/Al-Nafuur/United-Carts-of-Atari/blob/main/source/STM32firmware/PlusCart/Src/cartridge_emulation_ELF.c

uint32_t mainArgs[MP_COUNT] =
{
	0, // MP_SYSTEM_TYPE (TBD below)		0  - Should be set based on TV
	SystemCoreClock, // MP_CLOCK_HZ			1 - Should be set based on arm CPU clock
	FF_MULTI_CART, // MP_FEARTURE_FLAGS		2 - Use this flag to indicate that the game should support exiting 
};

// For MP_SYSTEM_TYPE
#define ST_NTSC_2600 0
#define ST_PAL_2600 1
#define ST_PAL60_2600 2

// For MP_FEATURE_FLAGS
#define FF_MULTI_CART 1 // Indicates elf is loaded by multicart and should allow exiting (return from main() function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions