Releases: nataliapc/msx2daad
Releases · nataliapc/msx2daad
msx2daad v3.0.0
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_hasatuses alternate flag bank 60-91 whenF53_ALTFLAGSis set- Parser exposes unrecognized-word and prep-before-noun bits in
fOFlags do_PAUSE(0)becomes a blocking GETKEY in V3 DDBsdo_EXTERNcase 7 (XUNDONE) is now a no-op in V3 (removed per spec)
- New condacts:
- Spanish enclitic pronouns
-lo/-la/-los/-lasinjected asPRONOUNtoken after matched VERB, resolved via flags 46/47 (PRP016,-DLANG_ESonly). HonoursF53_NOPRONOUNfor verb id≥240 (workaround for the false positive on 5-char verbs likeHABLA/FALLA). - GFX 9 / 10 —
SET_PALETTE/GET_PALETTEfully implemented for SC5/6/7/8; SC12 no-op (PRP020). - GFX 7 / 8 — Text Write to Phys / Back — new
gfxTextOffsetredirects 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/scommands (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
HMMCcommand continuation. - 2-pass
--transparent-color=Ntransparency (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,Yincx[l]emits aFIXEDIMGchunk 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/PARSEisDoneoverridden bycondactList[].flag=1:processPROC()was OR-ingisDone |= ce->flagafter the condact, silently undoing the in-body logic and breaking the V3 patternSYNONYM COGER TODO / ISDONE / ....Fix:flag=0.- V3
F53_UNRECWRDnever set: the injectedUNKNOWN_WORDtoken usedid=0, which is the end-of-buffer sentinel inpopulateLogicalSentence. NewSYNTH_UNKNOWN_ID=2(symmetric to the existingSYNTH_PRONOUN_ID=1). referencedObjectnow 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.processPROCnow emits an implicitDONEwhen the process table is exhausted with an activeDOALL(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).Obj2ext-attribute byte order aligned withreferencedObjectwrites 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_SYNONYMnow setsisDone=trueonly in V2 (V3 spec §7).do_CHANCE,do_DROPALL,do_RAMSAVE,do_RAMLOAD: fixed off-by-one errors (PRP001-003).do_COPYFOreordered to extract objno before write, preventing silent corruption iferrorCode()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=256path was always false against uint8numObjDsc— objects inside containers are now correctly located.printedLines/checkPrintedLines_inUseare initialized ininitFlags()— first "More…" page break no longer fires one line late.initDAAD/initFlags: correctedmemsetusage (buffer overflow and uninitialized Window fields).#elif LANG_EN→#elif defined(LANG_EN)— defensive guard (PRP018 MIN-03).initDAADV2 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_BACKmoved outside#ifndef DISABLE_GFXso they work in text-only builds.IMG_CHUNK_PALETTEnow syncs the RAM palette array beforesetPalette()soGFX_GET_PALETTEreturns correct values after an image load.- R#44 off-by-one annex (affects the new V2 chunked path):
fastVCopywas 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 extractingdata[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 insfxInit,sfxToneand a safety guard added tosfxWriteRegister.
🗄️ 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: addSEEK_END, return-1Linstead ofdie().- 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 bcremoved fromkbhit,_internal_placeObject/_internal_windowResetfactored out (-64 bytes), object-pointer caching ingetObjectId/_sumLocation/_internal_doall. - 8 more Z80 optimizations in
daad_condacts.c(PRP012):value%8→value&7, 8-bit division inCHANCE/RANDOM, 8-bit carry forPLUS/ADD, hot-loop pointer caching inprocessPROC. - Removed 13 unnecessary
staticlocals 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_V2and theMSX2DAAD wiki. - Dual stubs (
condacts_stubs/daad_stubs) and a newdo_entry()helper that replicatesprocessPROC's inner loop withcheckEntrygating. - New coverage:
tests_daad_parser_sentences.c,tests_condacts_v3.c,F53_UNRECWRDregression, HABLA enclitic contract (5 tests H1-H5) locking both directions.
📚 Documentation & tooling
docs/DAAD_Ready_Documentation_V2.mdadded (DRC compiler reference,@indirection syntax).AGENTS.mdupdated with the new test architecture and knowledge sources.daad-systemAI skill for MSX2DAAD development.
🔧 Packaging
- All EN_* and ES_* release package targets now include
-DDAADV3. - Build system switched from
docker-composeto directdocker run. FULLOPToptimization 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
msx2daad v1.4
- 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
- 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
- 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
- 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
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).