2017-10-06 09:48:52 -04:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 The Altra64 project contributors
|
|
|
|
// Portions (c) 2013 saturnu (Alt64) based on libdragon, Neo64Menu, ED64IO, libn64-hkz, libmikmod
|
|
|
|
// See LICENSE file in the project root for full license information.
|
|
|
|
//
|
2017-10-11 11:53:18 -04:00
|
|
|
#ifndef MAIN_H
|
|
|
|
#define MAIN_H
|
2017-10-06 09:48:52 -04:00
|
|
|
|
2017-10-11 12:44:46 -04:00
|
|
|
//TODO: these should probably be static not protos in main
|
2014-06-29 01:10:11 -04:00
|
|
|
void bootRom(display_context_t disp, int silent);
|
|
|
|
void loadrom(display_context_t disp, u8 *buff, int fast);
|
|
|
|
|
2017-10-11 11:35:30 -04:00
|
|
|
void readSDcard(display_context_t disp, char *directory);
|
|
|
|
int saveTypeToSd(display_context_t disp, char* save_filename ,int type);
|
2014-06-29 01:10:11 -04:00
|
|
|
|
2017-10-11 11:35:30 -04:00
|
|
|
void drawShortInfoBox(display_context_t disp, char* text, u8 mode);
|
2014-06-29 01:10:11 -04:00
|
|
|
void drawTextInput(display_context_t disp,char *msg);
|
|
|
|
|
2017-10-11 11:35:30 -04:00
|
|
|
//#define ishexchar(c) (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F')) || ((c >= 'a') && (c <= 'f')))
|
2014-06-29 01:10:11 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Return the uncached memory address of a cached address
|
|
|
|
*
|
|
|
|
* @param[in] x
|
|
|
|
* The cached address
|
|
|
|
*uint32_t
|
|
|
|
* @return The uncached address
|
|
|
|
*/
|
2017-10-11 11:35:30 -04:00
|
|
|
//#define UNCACHED_ADDR(x) ((void *)(((uint32_t)(x)) | 0xA0000000))
|
2014-06-29 01:10:11 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Align a memory address to 16 byte offset
|
|
|
|
*
|
|
|
|
* @param[in] x
|
|
|
|
* Unaligned memory address
|
|
|
|
*
|
|
|
|
* @return An aligned address guaranteed to be >= the unaligned address
|
|
|
|
*/
|
2017-10-11 11:35:30 -04:00
|
|
|
//#define ALIGN_16BYTE(x) ((void *)(((uint32_t)(x)+15) & 0xFFFFFFF0))
|
2017-10-11 11:53:18 -04:00
|
|
|
|
|
|
|
#endif
|