-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcartrom.h
25 lines (20 loc) · 936 Bytes
/
cartrom.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
* Based in f2a by Ulrich Hecht <[email protected]>
* if2a by D. Gauchard <[email protected]>
* F2A Ultra support by Vincent Rubiolo <[email protected]>
* Licensed under the terms of the GNU Public License version 2
*/
#ifndef __CARTROM_H__
#define __CARTROM_H__
#define ASCII(x) _ASCII((unsigned char)(x))
#define _ASCII(x) (((x) >= 32 && isascii(x))? (x): '.')
int cart_crc32 (const unsigned char *str, int *crc32buf, int size);
int trim (const unsigned char* rom, int size);
const char* romname (const unsigned char* rom);
const char* filename2romname (const char* filename);
void correct_header (unsigned char* rom, const char* name, int force_name);
void adjust_rom_size (int* size);
void adjust_burn_addresses (int* offset, int* size);
void adjust_load_addresses (int* offset, int* size);
unsigned char* prepare_loadandwrite_sram (const char* file, int offset, int size);
#endif // __CARTROM_H__