Skip to content

Releases: nataliapc/msx2daad

msx2daad v3.0.0

02 May 22:25

Choose a tag to compare

Major release adding DAAD V3 support, Spanish pronoun mechanics, completed GFX palette/text routines, a new chuncked V2 image format with V9938 streaming + transparency, a comprehensive unit test suite (442 tests), and 50+ engine, parser and tooling bug fixes against the DAAD 1991/2018 specs.

✨ New features

  • DAAD V3 support (-DDAADV3) with V2 compatibility (PRP013)
    • New condacts: XMES (120), INDIR (122), SETAT (124)
    • Flag 53 bitmasks: DOALLNONE, ALTFLAGS, NOPRONOUN, PREPFIRST, UNRECWRD
    • _internal_hasat uses alternate flag bank 60-91 when F53_ALTFLAGS is set
    • Parser exposes unrecognized-word and prep-before-noun bits in fOFlags
    • do_PAUSE(0) becomes a blocking GETKEY in V3 DDBs
    • do_EXTERN case 7 (XUNDONE) is now a no-op in V3 (removed per spec)
  • Spanish enclitic pronouns -lo/-la/-los/-las injected as PRONOUN token after matched VERB, resolved via flags 46/47 (PRP016, -DLANG_ES only). Honours F53_NOPRONOUN for verb id≥240 (workaround for the false positive on 5-char verbs like HABLA/FALLA).
  • GFX 9 / 10 — SET_PALETTE / GET_PALETTE fully implemented for SC5/6/7/8; SC12 no-op (PRP020).
  • GFX 7 / 8 — Text Write to Phys / Back — new gfxTextOffset redirects all text-writing paths across SC5/6/7/8/10/12 (PRP021).
  • PRONOUN parser (flags 46/47) per 1991 manual: non-proper nouns (id ≥ 50) persist across sentences, filling empty Noun1/Adject1 when a pronoun is typed (PRP015).
  • Comprehensive unit test suite (PRP008/009/010): monolithic test file split into 11 binaries (condact1-6, cond_v3, dos, objwght, daadobjs, gettoken, initobj, parser), shared stubs, and output-capture mocks. 400+ tests validated against DAAD_Manual_1991 and DAAD_Ready_V2.
  • New chunked V2 image format with V9938 streaming, replacing the legacy c/cl/s commands (now marked DEPRECATED):
    • ImgWizard v1.4.x with INFO (pixelType / paletteType / chipsetType, incl. SC10/SC12), V9938Cmd and V9938CmdData chunks.
    • New cx[l] <fileIn.SC?> <x> <y> <w> <h> [compressor] command that streams HMMC to port #9B in slices ≤ 2040 bytes.
    • VRAM-sink decompressors (raw, rle, pletter, zx0) compatible with HMMC command continuation.
    • 2-pass --transparent-color=N transparency (LMMC AND + LMMC OR over mask/image) on SC5/6/7/8/10.
    • ZX0 VRAM decompressor (dzx0vram(), –22 % after 10 MDL-driven opts) added as compressor #3.
    • PLETTER decompressor is DEPRECATED.
    • FONT.IM* regenerated with cx zx0.
    • Paletted+YJK transparency on SC10 preserving the shared chroma of the 4-byte YJK group).
    • --fixed=X,Y in cx[l] emits a FIXEDIMG chunk with global offsets for fixed-position graphics.
  • SDCC 4.1.0 → 4.5.0 migration (PRP007) and __z88dk_fastcall_sdcccall(1) calling convention.
  • Docker-based build replacing docker-compose, with single-image SDCC toolchain.

🐛 Engine and parser bug fixes

  • SYNONYM / PARSE isDone overridden by condactList[].flag=1: processPROC() was OR-ing isDone |= ce->flag after the condact, silently undoing the in-body logic and breaking the V3 pattern SYNONYM COGER TODO / ISDONE / .... Fix: flag=0.
  • V3 F53_UNRECWRD never set: the injected UNKNOWN_WORD token used id=0, which is the end-of-buffer sentinel in populateLogicalSentence. New SYNTH_UNKNOWN_ID=2 (symmetric to the existing SYNTH_PRONOUN_ID=1).
  • referencedObject now writes full byte to flags 56/57 (bits were masked to 0-6).
  • initFlags() clears all 256 flags; CRT0 does not zero BSS and hex2bin padding (0xFF) violated "all flags cleared" in the 1991 manual.
  • processPROC now emits an implicit DONE when the process table is exhausted with an active DOALL (manual step 4).
  • nextLogicalSentence: conjunction detection was checking the id byte instead of the type byte (real games use id=2, not id=5); also fixed buffer overrun past the null terminator (PRP014).
  • Obj2 ext-attribute byte order aligned with referencedObject writes to flags 58/59, matching PCDAAD behaviour (PRP015).
  • Adjective2 parser: switched to PCDAAD's "first empty slot" strategy — "GET RED LAMP FROM RED BOX" no longer drops the second adjective (PRP017).
  • do_SYNONYM now sets isDone=true only in V2 (V3 spec §7).
  • do_CHANCE, do_DROPALL, do_RAMSAVE, do_RAMLOAD: fixed off-by-one errors (PRP001-003).
  • do_COPYFO reordered to extract objno before write, preventing silent corruption if errorCode() becomes non-looping.
  • strnicmp("una ", …, 3)… 4 — 3-char compare matched "uno " as "una " (PRP018 MIN-01).
  • getObjectWeight: fix infinite recursion and wrong weight calculation.
  • getObjectId: LOC_CONTAINER=256 path was always false against uint8 numObjDsc — objects inside containers are now correctly located.
  • printedLines / checkPrintedLines_inUse are initialized in initFlags() — first "More…" page break no longer fires one line late.
  • initDAAD / initFlags: corrected memset usage (buffer overflow and uninitialized Window fields).
  • #elif LANG_EN#elif defined(LANG_EN) — defensive guard (PRP018 MIN-03).
  • initDAAD V2 version check no longer trapped inside #ifdef DAADV3.

🎨 GFX fixes

  • gfxSetPalette: red/green were swapped in the GRB333 conversion (PRP020).
  • gfxPutChPixels: improved SCREEN branching for correct colour handling.
  • GFX_CLEAR_PHYS / GFX_CLEAR_BACK moved outside #ifndef DISABLE_GFX so they work in text-only builds.
  • IMG_CHUNK_PALETTE now syncs the RAM palette array before setPalette() so GFX_GET_PALETTE returns correct values after an image load.
  • R#44 off-by-one annex (affects the new V2 chunked path): fastVCopy was loading R#44 (CLR) with the first byte of the compressed payload instead of a real pixel → garbage pixel 0 + the whole image shifted +1. Fixed by extracting data[0] uncompressed and emitting chunks of N-1 bytes.

🔊 Hardware safety

  • PSG register 7 (PRP011): bits 7/6 are I/O port direction bits and must always be bit7=1, bit6=0. Previous code wrote 0 to bit 7, which could damage hardware connected to the PSG pins. Fixed in sfxInit, sfxTone and a safety guard added to sfxWriteRegister.

🗄️ DOS library (backport from sdcc_msxdos)

  • dos_dosver: correct Nextor detection (read IXh, not I) and DOS2 check (jr nc).
  • dos_fputs: add missing return statement.
  • dos_get_program_path: rewrite with version detection and MSX-DOS 1 fallback.
  • dos_fclose / dos_getchar: preserve IX across DOSCALL.
  • dos_fgets: fix operator precedence in EOF check.
  • dos_fseek: add SEEK_END, return -1L instead of die().
  • Transcript I/O ported to single-fd implicit API.

⚡ Performance

  • Z80 micro-optimizations (~107 bytes saved): iterative printBase10, rand()%4& 3, scope hoist of _hex[], push/pop bc removed from kbhit, _internal_placeObject/_internal_windowReset factored out (-64 bytes), object-pointer caching in getObjectId / _sumLocation / _internal_doall.
  • 8 more Z80 optimizations in daad_condacts.c (PRP012): value%8value&7, 8-bit division in CHANCE/RANDOM, 8-bit carry for PLUS/ADD, hot-loop pointer caching in processPROC.
  • Removed 13 unnecessary static locals from condact handlers — frees BSS and enables SDCC register allocation.
  • Minor further optimizations to do_SFX/do_GFX (uint8 params), _internal_remove (redundant location check removed).

🧪 Tests

  • Suite reorganised into 11 binaries + parser/V3 → 442 OK / 0 FAIL / 16 TODO, validated against DAAD_Manual_1991, DAAD_Ready_V2 and the MSX2DAAD wiki.
  • Dual stubs (condacts_stubs / daad_stubs) and a new do_entry() helper that replicates processPROC's inner loop with checkEntry gating.
  • New coverage: tests_daad_parser_sentences.c, tests_condacts_v3.c, F53_UNRECWRD regression, HABLA enclitic contract (5 tests H1-H5) locking both directions.

📚 Documentation & tooling

  • docs/DAAD_Ready_Documentation_V2.md added (DRC compiler reference, @ indirection syntax).
  • AGENTS.md updated with the new test architecture and knowledge sources.
  • daad-system AI skill for MSX2DAAD development.

🔧 Packaging

  • All EN_* and ES_* release package targets now include -DDAADV3.
  • Build system switched from docker-compose to direct docker run.
  • FULLOPT optimization budget reduced from 2,000,000 → 200,000 allocs per node.

Full changelog: version_1.5...version_3.0.0

Thanks to @Utodev

msx2daad v1.5

30 Oct 16:24

Choose a tag to compare

  • Speed/size optimizations
  • INPUT partially implemented
  • Fixed ISDONE/ISNOTDONE mechanism (issue #13)
  • Fixed INKEY condact (issue #23)
  • Fixed RAMLOAD
  • Fixed COPYFO
  • Fixed TIME
  • Fixed WINDOW
  • English pronoums bugfix
  • Condact unit tests
  • imagewizard.php updated

msx2daad v1.4

03 Oct 12:59

Choose a tag to compare

  • Implemented DOALL condact.
  • Added new GFX routines (128, 129) -MSX2 only-
  • Support for PARSE 1 condact (for orders like: SAY "HELLO").
  • Reading of input keys optimized to avoid DOS BIOS calls.
  • WHATO condact fixed (issues #17 #5).
  • PLACE condact & object count fix.
  • XSAVE bugfix.
  • HASAT/HASNAT added undocumented use.
  • Info_daad.tcl debug script for openMSX.
  • Support to enable CPU Turbo (MSX2+) & R800 (TurboR).
  • Character printing speed optimizations.
  • LastPicture functionality now is at WINDOW level not global.
  • Improvements in DOS2 library.
  • IssueFix #21: Don't change unknown object articles.

msx2daad v1.3

15 Jan 17:02

Choose a tag to compare

  • Support for SCREEN 10 (YJK+RGB mode with 12499 colors)
  • imgwizard: Added support to image creation with transparencies.
  • imgwizard: Added Chunks: CLS, RESET, SKIP, PAUSE.
  • imgwizard: We can now delete chunks and join images.
  • imgwizard: Can convert SC5 to SC10(RGB) and SC12 to SC10(YJK)
  • Corrected condacts: INKEY, LOAD.
  • Added XUNDONE (Maluva)
  • Added partial support to condacts SFX and GFX.
  • Added Debug Transcript to file support.
  • fGFlags and fScMode flags initialization fixed.
  • Bugfix: using ATGT and ATLT.
  • Bugfix: using LISTAT y LISTOBJ.
  • Fixed #11 : PAPER and INK aren't globals, each WINDOW have its own.
  • Fixed #12 : MORE message don't must be show with 1 row windows.

Thanks to @rockersuke for the issue repports.

msx2daad v1.2

18 Nov 15:42

Choose a tag to compare

  • Support of XPLAY virtual condact of DRC compiler.
  • Pictures can now have transparency, any width/height, and be painted in a specific place using WINDOW.
  • Bugfixes

msx2daad v1.1

13 Nov 22:59

Choose a tag to compare

  • Several bugfixes.
  • Objects management can support several objects with same name.
  • Text compression tokens not limited to 5 characters.
  • Bugfixed pletter5 decompression of images

msx2daad v1.0

09 Nov 15:38

Choose a tag to compare

First release.
The compiled binaries are included for all screeen modes and spanish and english languages.
Also included a minimal adventure ready to use just for testing purpose (sources and disks).