mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-26 21:12:07 +00:00
remove psion2 compatibility; i doubt anyone uses it
This commit is contained in:
@@ -80,7 +80,7 @@ out_Setname(char *tzOutputfile)
|
||||
}
|
||||
|
||||
void
|
||||
GBROM_Output(void)
|
||||
Output(void)
|
||||
{
|
||||
SLONG i;
|
||||
FILE *f;
|
||||
@@ -105,101 +105,3 @@ GBROM_Output(void)
|
||||
MapfileCloseBank(area_Avail(i));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PSION2_Output(void)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
if ((f = fopen(tzOutname, "wb"))) {
|
||||
struct sSection *pSect;
|
||||
UBYTE *mem;
|
||||
ULONG size = MaxAvail[0] - area_Avail(0);
|
||||
ULONG relocpatches;
|
||||
|
||||
fputc(size >> 24, f);
|
||||
fputc(size >> 16, f);
|
||||
fputc(size >> 8, f);
|
||||
fputc(size, f);
|
||||
|
||||
if ((mem = malloc(MaxAvail[0] - area_Avail(0)))) {
|
||||
MapfileInitBank(0);
|
||||
|
||||
pSect = pSections;
|
||||
while (pSect) {
|
||||
if (pSect->Type == SECT_CODE) {
|
||||
memcpy(mem + pSect->nOrg, pSect->pData,
|
||||
pSect->nByteSize);
|
||||
MapfileWriteSection(pSect);
|
||||
} else {
|
||||
memset(mem + pSect->nOrg, 0,
|
||||
pSect->nByteSize);
|
||||
}
|
||||
pSect = pSect->pNext;
|
||||
}
|
||||
|
||||
MapfileCloseBank(area_Avail(0));
|
||||
|
||||
fwrite(mem, 1, MaxAvail[0] - area_Avail(0), f);
|
||||
free(mem);
|
||||
}
|
||||
relocpatches = 0;
|
||||
pSect = pSections;
|
||||
while (pSect) {
|
||||
struct sPatch *pPatch;
|
||||
|
||||
pPatch = pSect->pPatches;
|
||||
|
||||
while (pPatch) {
|
||||
if (pPatch->oRelocPatch) {
|
||||
relocpatches += 1;
|
||||
}
|
||||
pPatch = pPatch->pNext;
|
||||
}
|
||||
pSect = pSect->pNext;
|
||||
}
|
||||
|
||||
fputc(relocpatches >> 24, f);
|
||||
fputc(relocpatches >> 16, f);
|
||||
fputc(relocpatches >> 8, f);
|
||||
fputc(relocpatches, f);
|
||||
|
||||
pSect = pSections;
|
||||
while (pSect) {
|
||||
struct sPatch *pPatch;
|
||||
|
||||
pPatch = pSect->pPatches;
|
||||
|
||||
while (pPatch) {
|
||||
if (pPatch->oRelocPatch) {
|
||||
ULONG address;
|
||||
|
||||
address = pPatch->nOffset + pSect->nOrg;
|
||||
fputc(address >> 24, f);
|
||||
fputc(address >> 16, f);
|
||||
fputc(address >> 8, f);
|
||||
fputc(address, f);
|
||||
}
|
||||
pPatch = pPatch->pNext;
|
||||
}
|
||||
pSect = pSect->pNext;
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Output(void)
|
||||
{
|
||||
if (oOutput) {
|
||||
switch (outputtype) {
|
||||
case OUTPUT_GBROM:
|
||||
GBROM_Output();
|
||||
break;
|
||||
case OUTPUT_PSION2:
|
||||
PSION2_Output();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user