Migrating from ORCA/C to Clang for the IIgs.
This commit is contained in:
parent
2d447f3d95
commit
c80610747a
8 changed files with 7 additions and 18 deletions
|
|
@ -189,7 +189,7 @@ The user should pick which to prioritize.
|
|||
|
||||
The repo's auto-memory at
|
||||
`~/.claude/projects/-home-scott-claude-joeylib/memory/` includes
|
||||
JoeyLib-wide context (CMake quirks, ORCA-C gotchas, perf
|
||||
JoeyLib-wide context (CMake quirks, IIgs toolchain gotchas, perf
|
||||
constraints) plus `project_joeylib_agi_plan.md` which describes the
|
||||
overall AGI port plan. All persist into the next session
|
||||
automatically; no need to reload.
|
||||
|
|
@ -197,9 +197,8 @@ automatically; no need to reload.
|
|||
Specifically relevant to the AGI port:
|
||||
|
||||
- `project_joeylib_agi_plan.md` — overall plan, 3-4 month estimate
|
||||
- `feedback_orca_c_atoi_segment.md` — don't use atoi in AGI code
|
||||
(it pushes the IIgs ORCA-C stdio cluster past 64 KB; we use a
|
||||
manual parseArgU8 instead)
|
||||
- AGI code uses a manual `parseArgU8` instead of atoi to keep the
|
||||
IIgs link budget small.
|
||||
- `project_perf_directive.md` — IIgs is the perf floor; every
|
||||
other target must match or beat it
|
||||
- `feedback_iigs_speed.md` — IIgs must be absolute fastest
|
||||
|
|
@ -213,6 +212,6 @@ Specifically relevant to the AGI port:
|
|||
`feedback_git.md`).
|
||||
- Always `source toolchains/env.sh` before any `make` -- the user
|
||||
has added that to .claude/settings.local.json allow list.
|
||||
- DJGPP / ORCA / vasm / m68k-atari-mint paths come from env.sh.
|
||||
- DJGPP / llvm-mos / vasm / m68k-atari-mint paths come from env.sh.
|
||||
- The user does NOT need hand-holding -- they're an expert C dev.
|
||||
Skip excessive explanation; describe what was done and move on.
|
||||
|
|
|
|||
3
agi.c
3
agi.c
|
|
@ -307,7 +307,6 @@ static uint32_t gAgiV11SubTickAccum; // counts AGI ticks toward next
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIMAIN";
|
||||
#endif
|
||||
|
||||
// ----- Internal helpers (alphabetical) -----
|
||||
|
|
@ -1687,7 +1686,6 @@ static void updateEgoFromInput(void) {
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "";
|
||||
#endif
|
||||
|
||||
// ----- Entry point -----
|
||||
|
|
@ -1703,7 +1701,6 @@ int main(int argc, char **argv) {
|
|||
bool vmReady;
|
||||
|
||||
cfg.codegenBytes = 0u; // no sprites needed -- backdrop-restore path is direct memcpy
|
||||
cfg.maxSurfaces = 4u; // stage + backdrop (2 used)
|
||||
// AGI sound is software-synthesized PSG squarewaves pushed
|
||||
// through the Sound Blaster auto-init DMA path (see agiSynthFill
|
||||
// and src/port/dos/audio.c). The audio pool covers the 4 KB
|
||||
|
|
|
|||
1
agiObj.c
1
agiObj.c
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIOBJ";
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
3
agiPic.c
3
agiPic.c
|
|
@ -81,7 +81,6 @@ static void plot(AgiPicT *pic, const PicStateT *state, int16_t x, int16_t y)
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIPIC";
|
||||
#endif
|
||||
|
||||
// ----- Internal helpers (alphabetical) -----
|
||||
|
|
@ -122,7 +121,7 @@ static void drawCorner(AgiPicT *pic, const PicStateT *state, const uint8_t *data
|
|||
// the minor axis is linearly interpolated with round-half-away-from-
|
||||
// zero. All math stays in 16-bit -- AGI coordinates are 8-bit so the
|
||||
// worst product (dy * i = 167 * 167 = 27889) fits in int16, and the
|
||||
// 65816 build avoids ORCA-C's long-arithmetic helpers entirely.
|
||||
// 65816 build avoids long-arithmetic helpers entirely.
|
||||
static void drawLine(AgiPicT *pic, const PicStateT *state, int16_t x0, int16_t y0, int16_t x1, int16_t y1) {
|
||||
int16_t dx;
|
||||
int16_t dy;
|
||||
|
|
|
|||
5
agiRes.c
5
agiRes.c
|
|
@ -48,9 +48,8 @@
|
|||
|
||||
// IIgs 64 KB code-bank rule: park this TU in its own load segment
|
||||
// so it doesn't pile onto _ROOT (which still holds main() and the
|
||||
// ORCA-C startup). Cross-platform builds ignore this pragma.
|
||||
// runtime startup). Cross-platform builds ignore this pragma.
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIRES";
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -154,7 +153,7 @@ static bool loadDirectory(AgiGameT *game, AgiResTypeE type, const char *gameDir,
|
|||
}
|
||||
|
||||
volNibble = (uint8_t)(buf[0] >> 4);
|
||||
// 20-bit offset, cast to uint32_t before shift so ORCA-C's
|
||||
// 20-bit offset, cast to uint32_t before shift so a
|
||||
// 16-bit int doesn't truncate the (& 0x0F) << 16 term.
|
||||
offset = ((uint32_t)(buf[0] & 0x0F) << 16) | ((uint32_t)buf[1] << 8) | (uint32_t)buf[2];
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGITXT";
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIVIEW";
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -143,7 +142,6 @@ uint8_t agiActorPriorityForY(int16_t y) {
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIDRAW";
|
||||
#endif
|
||||
|
||||
void agiViewDraw(const AgiViewT *view, uint8_t loopIdx, uint8_t celIdx,
|
||||
|
|
|
|||
1
agiVm.c
1
agiVm.c
|
|
@ -273,7 +273,6 @@
|
|||
|
||||
|
||||
#ifdef JOEYLIB_PLATFORM_IIGS
|
||||
segment "AGIVM";
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue