From: ggn Date: Wed, 26 Oct 2022 18:30:21 +0000 (+0300) Subject: Fix for #210 - 6502 mode with -fr working X-Git-Tag: v2.2.13^0 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=41a8ca9921f49fc9f238e3c1aaf0ce44a9fc1043 Fix for #210 - 6502 mode with -fr working --- diff --git a/6502.c b/6502.c index 131c6d8..66f2080 100644 --- a/6502.c +++ b/6502.c @@ -243,6 +243,7 @@ int d_6502() regtab = reg65tab; regcheck = reg65check; regaccept = reg65accept; + used_architectures |= M6502; return 0; } @@ -570,6 +571,26 @@ void m6502obj(int ofd) } +// Write raw 6502 org'd code. +// Super copypasta'd from above function +void m6502raw(int ofd) +{ + CHUNK * ch = sect[M6502].scode; + + // If no 6502 code was generated, bail out + if ((ch == NULL) || (ch->challoc == 0)) + return; + + register uint8_t *p = ch->chptr; + + for(uint16_t * l=&orgmap[0][0]; l