Releases: Stephane-D/SGDK
Releases · Stephane-D/SGDK
SGDK 2.00 (january 2024)
COMPILER
- added new xgm2tool
- RESCOMP
- added new XGM2 resource type
- MAP: fixed TMX high priority layer definition from " high" (thanks cidoku)
- TILESET: fixed a small bug with empty tileset
- SPRITE: small improvement in sprite cutting processing
- changed sound drivers name
- improved clarity of console output (thanks danielt3)
- MAKEFILE
- improved support for newer Linux based GCC (thanks Craig Hackney)
- support for deeper file structure
- README
- added alternates sound drivers references
LIBRARY
- SPRITE
- sprites are now initialized with an intermediate depth level (leave more freedom for afterward depth adjustment)
- added SPR_setAnimationLoop(..) method to enable/disable animation loop
- added SPR_setAlwaysAtBottom(..) method because why not ^^
- OBJECT
- optimized object release operation when maintaining coherency
- MATH
- refactoring / improvements on fix16 / fix32 operations
- added fastfix16 (ff16) and fastfix32 (ff32) types
- MEM
- fixed MEM_allocAt(..) function
- VDP
- fixed VDP VSRAM read / write / DMA command
- text clear operation is now done by using the 'space' char instead of tile #0
- added VDP_setVInterrupt(bool) method to enable/disable V-Interrupt
- small fix on RGB24_TO_VDPCOLOR(..) macro (thanks Werton)
- PAL
- PAL_getColor(..) / PAL_getPalette(..) / PAL_getColors(..) return forced RGB333 value (undefined bits are set to 0)
- SYS
- removed z80 halt on reset (already done in sega.s boot)
- SOUND
- major refactor in sound drivers structure
- added new XGM2 sound driver - beta (XGM2_xxx methods)
- added 'minimusic' sound driver from Sik
- removed fractal driver support (driver is discontinued) and enable conso…
- TYPE
- fixed bool declaration to be compliant with C23
- added size_t and ptrdiff_t definitions
- 'console' module is now enabled by default
- added new SGDK logo from Adrian Spoz (thanks for making it !)
- smalls fixes, general cleanup, some refactoring..
SAMPLE
- moved 'sonic' and 'platformer' samples into 'sample/game' folder
- moved 'sound' sample into 'sample/snd/sound-test' and moved 'xgm-player' into 'sample/snd'
- moved 'console' and 'multitasking' samples into 'sample/sys' folder
- renamed 'bench' sample to 'benchmark'
- updated samples to last SGDK
SGDK 2.00 MIGRATION NOTE
- SND_xxx_ methods --> SND__xxx
- SND_xxx_XGM methods removed (use XGM_xxx methods instead)
- Z80_DRIVER_2ADPCM --> Z80_DRIVER_DPCM2
- Z80_DRIVER_4PCM --> Z80_DRIVER_PCM4
SGDK 1.90 (july 2023)
COMPILER
- RESCOMP
- MAP: added support for 8x8 tile priority information for TMX maps (was fixed to TMX map tile size before)
- OBJECT: objects are now sorted on 'id' field by default (if it exists)
- OBJECT: added 'width' and 'height' fields export
- OBJECT: fixed 'name' field export
- OBJECT: fixed bug with f32 field value
- SPRITE: added support for empty frame in the middle of a sprite animation
- SPRITE: fixed bug with dummy empty frame when NONE optimisation level selected
- SPRITE: fixed a small bug in sprite frame duplicate detection
- SPRITE: added new optimization level for cutting process (replaced 'iteration' with 'optLevel')
- SPRITE: several fixes / improvements to sprite cutting algorithm
- PAL: better JASC .pal file support
- fixed a small bug with empty / dummy tileset
- added info in output log for duplicated objects
- rescomp.txt documentation updated and fixes
- several others tweaks and fixes
- XGMTOOL
- fixed compilation on linux (thanks to Andrew DeRosier)
- updated XGMTool binary to support ZGM output
- MAKEFILE
- made ext.mk optional
- LINK
- added .ramprog section for easier moving code into RAM
- DOCKER
- fixed windows docker build container (thanks to Allion Benjamin)
- removed wine32 dependency, support Apple M1 (arm64) and native tools too
- README
- fixed assembly (asm target) generation
- added links + smalls updates here and there
LIBRARY
- SPRITE:
Rewrote the sprite engine to get rid of hardware sprite allocation (note that the legacy sprite engine
is still accessible through the config.h file as it can be useful for sprite multiplexing).- better hardware sprite usage
- general simplification of the API
- lighter 'Sprite' structure
- re-introduced Y position in visibility computation
- lot of optimisations done to maintain same or get higher level of performance
- added SPR_getAnimationDone(..) method to know if current playing animation reached the last frame
- added SPR_getUsedVDPSprite() method to know how many hardware sprite are currently in use.
- added SPR_enableVDPSpriteChecking() / SPR_disableVDPSpriteChecking() methods
- added SPR_getFreeVRAM() and SPR_getLargestFreeVRAMBlock() methods
- keep same behavior in debug / release build
- OBJECT
- small fix in POOL_find(..) method
- MATH
- transformed some macros to methods for better type checking (can also help the compiler)
- CONSOLE
- added TTY console support (added as module - thanks to Andreas Dietrich for it)
- VDP
- modified MAX_VDP_SPRITE to SAT_MAX_SIZE as max displayable sprite depend from horizontal reolution
- disable VDP during VDP_resetScreen() process (faster operation)
- small fix on VDP_waitVSync() and VDP_waitVActive() methods to take care of VDP disable state
- SYS
- added SYS_nextFrame() method (just an alias to SYS_doVBlankProcess)
- added SYS_resetBanks(), SYS_getNextFarAccessRegion() and SYS_setNextFarAccessRegion() methods
- fixed a bug with soft reset + general safer soft reset operation
- added SYS_getShowFrameLoad() method
- fixed small bug in TSK_init()
- Z80
- several fixes and method updates for safer operation
- SOUND
- added XGM_setPCM_FAR(..) and XGM_setPCMFast_FAR(..) to allow playing PCM through bank switch
- added YM2612_readStatus() method
- JOY
- added JOY_getEventHandler() method (useful for saving / restoring callback)
- SAVE
- added flash save support (added as module - thanks to doragasu for it)
- MISC
- tweaked / improved readability of lz4w_unpack (thanks to HpMan)
- deprecated methods and definitions now generate compilation error
- added NO_INLINE definition when we want to force no inlining
- forced NO_INLINE on some larges functions to avoid code growing too much
- added megaWifi README file
- documentation updates
- smalls fixes, general cleanup, some refactoring..
SAMPLE
- BENCHMARK
- added new large scroll performance test
- added new big sprite tests
- reworked scoring (making it not comparable to previous versions unfortunately)
- small fixes
- updated samples to last SGDK
SGDK 1.90 MIGRATION NOTE
- removed spriteIndex parameter from SPR_addSpriteEx(..) function
- removed SPR_FLAG_AUTO_SPRITE_ALLOC definition (not anymore useful)
- removed resetz80 parameter from Z80_upload(..) function (it's always reset now)
- Z80_clear(..) doesn't take any parameters now (it always clears all the Z80 RAM now)
SGDK 1.80 (september 2022)
COMPILER
- RESCOMP
- added new OBJECTS resource (see rescomp.txt for more infos)
- added new TILEMAP resource (see rescomp.txt for more infos)
- added Tiled TMX map and object support (TILEMAP, MAP and OBJECT resources)
- added Tiled TSX tileset support (TILESET resource)
- added global RGB image support (see rescomp.txt for more infos)
- added .pal file and RGB image support for PALETTE resource
- added extension support so you can add your own custom resource (see rescomp.txt for more infos)
- better management of duplicated resources
- better compression logic (don't compress if gain is too low)
- better logic for extended attributes from tile (MAP and TILEMAP resources)
- improved tile indexing performance
- improved compilation reports
- some tweaks and fixes
- XGMTOOL
- added support to split VGM and PCM streams in VGM file (Thanks to Vic_)
- added ZGM (compressed VGM) export support (Thanks to Vic_, useful for 32X dev)
- MAKEFILE
- added '-fms-extensions' flag to allow usage of anonymous embedded structures and enums
- added '--register-prefix-optional,--bitwise-or' flags to help with assembly code (can use '|' as OR operator)
- added 'ext.mk' and 'ext_lib.mk' files for makefile extension and customization
- removed '-ggdb' flag for .s files compilation. It makes AS crashing when using 'dc.b' data declaration.
- README
- added 'useful tools' section
- some rewrites and tweaks (thanks to MrBen89)
- updated tutorial section
- updated thanks section
- added special thanks section
LIBRARY
- OBJECT
- added new 'pool' unit for easy and fast object pool management
- added new 'object' unit for easy general object implementation
- VDP
- renamed many constants for better coherency in naming convention (ex: TILE_USERINDEX --> TILE_USER_INDEX)
- renamed all GFX_xxx constants to VDP_xxx
- added bit fields to VDPSprite structure for easier field manipulation (thanks to Carlos Aragones)
- added many methods to manipulate these fields (thanks to Carlos Aragones)
- MAP
- removed 'palette' and 'tileset' fields from Map structure (better to handle that externally)
- fixed allocateMap(..) method
- MEM
- added MEM_allocAt(..) function to allocate memory at a fixed address
- splitted memory.h file --> memory.h and memory_base.h (easier to include in .s file)
- SYS
- faster H-int callback implementation (callback method need to be prefixed with HINTERRUPT_CALLBACK now)
- added TSK_init() method for easier proper multi tasking system initialization
- modified random() implementation to allow reproducible numbers sequence
- Z80
- added generic and customizable Z80 bus protection methods (Z80_useBusProtection / Z80_setBusProtection)
- added generic Z80_setForceDelayDMA() so it can be used by all sound driver (not only reserved to XGM sound driver)
- SOUND
- added Fractal sound driver support (https://gitlab.com/Natsumi/Fractal-Sound)
- added PSG_setToneLow(..) method (only set low part of tone register)
- renamed PSG_init() --> PSG_reset()
- TYPE
- added volatile fix16/fix32 type (vfix16, vfix32, vf16, vf32)
- changed 'bool' to 'u8' instead of 'u16' (don't waste RAM / ROM :p)
- added p16 type (short pointer for low ROM / high RAM address)
- DMA
- increased a bit default DMA buffer size
- added macros to create 'enum' compatible with assembly (.s) files
- documentation fixes / cleanups / updates
- removed old deprecated units and headers (vdp_pal and vdp_dma)
- general cleanup, some refactoring..
SAMPLE
- rewrote 'sonic' sample with better separation of different units.
- added new 'platformer' sample (thanks to Gerard Gascon).
- tweaked/fixed 'scaling' and 'wobble' samples (using the new fast h-int call)
SGDK 1.70 (february 2022)
COMPILER
- fixed bug in sizebnd companion tool
- RESCOMP
- fixed compression for BIN resource (AUTO cannot be accepted here)
- fixed a small bug preventing having a transparent tile with high priority or palette index > 0
- fixed a bug with 'opt' set to NONE in SPRITE resource
- fixed illegal sun 'WaveFileReader' class usage for WAV file resampling operation
- APJ
- MAKEFILE
- added 'EXTRA_FLAGS' entry to makefiles so we can use custom extra compilation flags
- added 'SGDK_GCC' define to identify SGDK compilation toolchain if needed (when used in larger build frameworks)
- modifications to support Linux native toolchains (thanks to Doragasu)
- LINK
- now use objcopy instead of ld to generate rom_head.bin (improve compatibility with others GCC)
- README
- added Doragasu references / version update
- added DOA game reference
- DOCKER
- use unprivileged sgdk user to avoid root privilege usage (thanks to Doragasu)
- Modifications to support Linux native toolchains (thanks to Doragasu)
- minors tweaks
LIBRARY
- added multitask support - see 'task' unit for more details (thanks to Doragasu)
- added MegaWifi support - module should be enable in config.h file (thanks to Doragasu)
- SPRITE
- VDP
- small fix to VDP_resetScreen() function to avoid a stack overflow on failure
- added VDP_drawTextEx(..), VDP_clearTextEx(..) and VDP_clearTextAreaEx(..) methods (can use DMA / DMA_QUEUE)
- MAP
- added wrapping support (map size need to be aligned on power of 2)
- added MAP_scrollToEx(..) method to allow forced full map redraw
- fixed a bug on initial map refresh
- fixed a small bug on full map refresh
- MATH
- added getNextPow2(..) method
- added casting to int to fix conversion (safer)
- SYS
- added VDP_setExtInterrupt(..) method and fixed ext interrupt enable stat…
- added new kprintf(..) method for easier KMod debug logging
- minor tweak on mapper banking logic
- DMA
- removed Z80 halt/resume hack before triggering DMA (was not preventing bus clash anyway)
- PAL
- fixed first set palette operation not always done in vblank during fading process (CRAM dots)
- simpler setFadePalette(..) implementation
- updated to use color value rounding instead of truncation for RGB24_TO_VDPCOLOR(..) macro
- added new RGB_TO_VDPCOLOR macros (thanks to emmanuel)
- STRING
- modified intToStr(..) to display hexa value for too large number
- for safety HALT_Z80_ON_IO is also enable by default (config.h file)
- some refactoring
- changed u16 to bool in some declarations
- documentation fixes / cleanups / updates
- cleanup, removed old deprecated units / headers
SAMPLE
- added linescroll sample
- added multitasking sample (thanks to Doragasu)
- added MegaWifi sample (thanks to Doragasu)
- BENCHMARK
- updated to fix tests when using pure C (still not perfect)
SGDK 1.65 (july 2021)
COMPILER
- RESCOMP
- added new NEAR function to force NEAR location of binary data (read rescomp.txt file for more info)
- fixed a small bug on MAP resource where it was using flipped version of a tile even if tileset was containing non flipped version
- better optimisation process for large sprites (close to the limit of 16 hardware sprites)
- many small fixes, tweaks and improvements to sprite cutting process
- added duplicated sprite frame optimization
- fixed typo on 2BPP to 8BPP image conversion
- added information on MAP resource compilation
- WAV resource can now be set as FAR (bank switch)
- fixed sample output override for WAV resource (needed for Bad Apple sample which use a custom ADPCM2 driver)
- fixed a possible bug in duplicated resource symbol
- APJ
- fixed cost computation (bit better compression)
- fixed encoding for short match with long offset
- more infos on encoding errors
- LINK
- increased theoretical max ROM size to ~3.8GB (using bank switch)
- README
- added MarsDev project reference
- added And-0 documentation references
- DOCKER
- use lighter docker image
- improved / fixed docker script (thanks to all contributors for that)
- rewrote sizebnd tool in Java and added auto checksum feature.
LIBRARY
- SPRITE
- fixed a bug where some sprites wouldn't be properly hidden in rare occasion
- automatically update VRAM region location when VRAM mapping changed
- VRAM region can be remapped if needed on defrag operation
- added sprite validity check in 'debug' build
- VDP
- VDP_resetScreen() now also reset VSRAM
- updated VRAM mapping for 64x64 plane size to allow full window map
- use new mul/div/mod functions for small performance improvement on some functions
- MAP
- fixed a decoding bug when we had consecutive same row block offset
- fixed MAP scrolling update when using TILE/LINE horizontal scrolling mode
- MATH
- added fix32Avg(..) and fix16Avg(..) methods
- added mulu/muls/divu/divs/modu/mods/divmodu/divmods(..) functions which allow to directly use the 68000 mul/div instruction (GCC doesn't always use them correctly)
- SYS
- added ROM_SIZE definition to get ROM size
- added SYS_getFarDataEx(..) and SYS_getFarDataSafeEx(..) methods
- added SYS_isCrossingBank(..) method
- fixed RAM mapping for bank switching with ROM larger than 12MB
- reset banks only when bank switch is enabled (may help with Everdrive X3)
- added SYS_setVBlankCallback(..) method
- added SYS_computeChecksum() and SYS_isChecksumOk() methods
- DMA
- lowered default PAL buffer capacity (DMA_BUFFER_SIZE_PAL_LOW) to spare memory
- HALT_Z80_ON_DMA is now enabled by default for the sake of safety
- added DMA_canQueue(..) method and small fix on transferSize calculation
- fixed a stupid bug in DMA_doDma(..) on 128K bank crossing
- removed some VDP_waitDMACompletion() check for performance reason (developer need to do it by himself)
- PAL
- added TransfertMethod parameter to set palette colors methods
- made 'fadeCurrentPal' and 'fadeEndPal' variables visible (can be useful)
- SOUND / XGM
- protected XGM_xxx methods against interrupts
- fixed XGM_pausePlay(..) which wasn't always muting all sound (thanks to BigEvilCorporation for the fix)
- fixed potential PENDING_FRM overflow (mutual change)
- XGM play / pause / resume commands are now exclusive (cannot be pending at same time)
- full YM reset on YM2612_reset()
- BITMAP
- fixed VRAM organization for Bitmap mode (restore 64x32 plane size on exit)
- use new mul/div/mod functions for small performance improvement on BMP_scale(..) function
- ROM HEADER
- updated default SRAM size to 64 KB
- JOY
- use the correct bits to detect 3-button.
- tried to compensate 6 button read to avoid the UP+DOWN issue state (emulator or unofficial controllers)
- small changes for better/safer soft reset behavior
- replaced some waitVSync() by SYS_doVBlankProcess()
- more detailed error / warning logs in debug build
- documentation fixes and updates
- cleanup, removed old deprecated units / headers
SAMPLE
- SONIC
- fixed DMA buffer size for initial MAP update
SGDK 1.62 (march 2021)
COMPILER
- RESCOMP
- fixed a small bug on MAP resource compression
- implemented independant compression on MAP resource
- XGM resource are now stored as FAR (accessible through bank switch)
- tweaked default BALANCED sprite cutting optimization strategy to reduce a bit sprite usage over tile
- increased maximum SPRITE width / height to 248 pixels (it was 128 pixels)
- optimized SPRITE metadata size (divided size by 4) at the expense of slower sprite processing
- force slow sprite cutting processing when specifying a number of iteration different from default (500000)
- added information (rescomp.txt) about how to provide extra data (priority / palette) on tilemap for MAP and IMAGE resources
- added support to grayscale image
- better error reporting
- BATCH
- several fixes to build_adv.bat file
- MAKEFILE
- makefile can now define GDK variable on its own (environment variable not anymore needed)
- fixed copy/paste typo in makelib.gen file
- README
- smalls changes to alternative OS solutions
- added Raster Scroll MD graphics guide reference
- updated credits part
- fixed line return
- increased maximum ROM size to 12MB
- removed resourcemanager tool which was not used nor complete
- added prelemenary docker support for easier SGDK usage on alternative OS (thanks to Steve Schnepp for it)
LIBRARY
- SYS
- added SYS_getFarDataSafe(..) method / FAR_SAFE(..) macro allowing safe access to resource crossing 512 KB banks
SGDK methods now use FAR_SAFE(..) accessor instead of FAR(..) for bank switch mechanism - fixed a bug in bank switch initialization
- better CPU load reporting
- minor change to main(..) prototype and return execution
- added new 'ROMHeader rom_header' variable to get easier access to ROM header infos
- added SYS_getFarDataSafe(..) method / FAR_SAFE(..) macro allowing safe access to resource crossing 512 KB banks
- SPRITE
- modified sprite structures to reduce metadata size (but at the expense of a bit slower processing)
- added SPR_getVisibility(..) and SPR_isVisible(..) methods
- now automatic sprite visibility is computed using only X position as we use it only scanline sprite usage optimization
- made 'firstSprite' / 'lastSprite' visible
- improved profiling
- DMA
- small tweak + some fixes when DMA is disabled
- VDP
- added VDP_setHorizontalScrollVSync() and VDP_setVerticalScrollVSync() methods to do delayed scrolling update
- safier VDP_drawText(..) / VDP_clearText(..) methods (bounds check)
- prevented tilemap column update when plane width is set to 128 (not possible because auto-inc register is limited to 255)
- MAP
- added priority info support to baseTile parameter in MAP_create(..)
- MATH
- removed MATH_BIG_TABLES define as it's not anymore useful with the lto
- add clamp function (thanks de Devon Powell)
- fix issue with rounding helpers (fix16)
- MEMORY
- added malloc(..) / free(..) so they forward to MEM_alloc(..) / MEM_free(..) methods
- SOUND
- added XGM_startPlay_FAR(..) to allow to play XGM music accessible through bank switch
- TIMER
- small fix on waitSubTick(..) method to take care of small wait during vblank
- JOY
- added JOY_writeJoypadX(..) and JOY_writeJoypadY(...) which allow to set a specific position for mouse pointer (Thanks to LIZARDRIVE)
- small change to 'Map' and 'Sprite' structure for better doxygen documentation reference
SAMPLE
- reworked folder structure
- added new basic HELLO_WORLD sample
- added BAD APPLE demo sample (to exhibit SGDK bank switching mechanism)
- added new WOBBLE fx sample (thanks to Andreas Dietrich for it)
- added new SCALING fx sample (thanks to Andreas Dietrich for it)
- SPRITE sample renamed to SONIC
- BENCHMARK
- better score computation for Sprite part (also now comparable to others tests)
SGDK 1.60 (december 2020)
COMPILER
- APLIB
- replaced appack tool by new APJ (Java APLIB packer) tool written from scratch
- LZ4W
- much faster compression speed
- better exit operation
- RESCOMP
- added new MAP resource and MAP_xx methods (in map.h unit) to handle large maps / background scrolling easily (finally !)
- integrated APJ tool for faster ApLib compression
- added per resource size information, fixed Map resource export...
- we can now disable sprite cutting optimisation ('NONE' value for opt parameter)
- fixed a small bug on Sprite cutting optimisation process
- added 'optimisation' parameter to TILESET resource
- fixed bug on tilemap generation with base tile index used
- fixed a mall bug in BIN resource export
- fixed a small bug on ALIGN directive
- optimized tile parsing
- XGMROMBUILDER
- now remember last used folder
- MAKEFILE
- added deps file (.d) support for better dependencies handling
- added sources sub folders support (2 depth levels)
- removed useless and undesired warnings
- README
- added GET STARTED part
- major rewrite / revamp to take benefit of Markdown format (thanks to Astrofra)
- others changes
LIBRARY
- WARNING - IMPORTANT CHANGE
Added SYS_doVBlankProcess(..) to replace automatic V-Int processing of SGDK.
This was done to avoid issues with missing interrupts protection and to offer more control in general.
So basically you should replace all your VDP_waitVSync() references with SYS_doVBlankProcess() - SYS
- faster user callback interrupt handling
- modified ROM header to enable SRAM by default
- fixed small initialization issue
- minor fix on SSF2 mapper initialization
- added LOG_LEVEL setting allowing different level of log for debug (default = LOG_LEVEL_WARNING)
- removed interrupts protection where they are not anymore useful
- small change for more accurate detection of frame miss
- MAP
Added new MAP engine (map.h unit) to handle large maps / background scrolling easily from MAP resource:- Map* MAP_create(const MapDefinition* mapDef, VDPPlane plane, u16 baseTile);
- void MAP_scrollTo(Map* map, u32 x, u32 y);
- u16 MAP_getMetaTile(Map* map, u16 x, u16 y);
- u16 MAP_getTile(Map* map, u16 x, u16 y);
- void MAP_getMetaTilemapRect(Map* map, u16 x, u16 y, u16 w, u16 h, u16* dest);
- void MAP_getTilemapRect(Map* map, u16 x, u16 y, u16 w, u16 h, bool column, u16* dest);
- DMA
- added DMA_xxxFast() methods (no 128 KB bank cross check)
- small tweaks for bit faster DMA queue
- tweaks in general to DMA methods
- increased default DMA queue size (we can quickly reach 64)
- VDP
- fixed a small bug on VDP_drawTextBG(..) method
- added VDP_waitVBlank() and VDP_waitVActive() methods
- added VDP_getPlaneAddress() method (was internal first)
- STRING
- added support to u32/s32 type to sprintf(..) function
- fixed fix16ToStr(..) and fix32ToStr(..) methods
- SOUND
- fixed a small bug on PCM command play (thanks to hsk)
- better restoring of Z80 BUS request state
- Z80
- added Z80_getAndRequestBus() method
- added loading of a dummy driver by default to keep Z80 active on init
- replaced some u16 parameter by bool where it makes sense to have it
SAMPLE
- Updated for SGDK 1.6 changes
- BENCHMARK
- minors changes (updated to version 1.31)
- SPRITE
- updated background to complete level dimension.
- updated to take benefit of the new MAP resource and advanced MAP methods
- added alternate scrolling update mode (still using new MAP unit)
SGDK 1.6 MIGRATION NOTE
- Replace all VDP_waitVSync() references with SYS_doVBlankProcess()
- Replace all VDP_waitVInt() references with SYS_doVBlankProcess()
SGDK 1.51 (april 2020)
COMPILER
- APPACK
- fixed build for 32 and 64 bit linux (thanks doragasu)
- LZ4W
- minor fix
- RESCOMP
- added new sprite optimization options to SPRITE resource (see rescomp.txt for details)
- minor tweak on binary export order (can save some bytes with LZ4W compression)
- fixed resource duplication bug
- XGMTOOL
- fixed VGM loop
LIBRARY
- fixed corrupted library binaries which were displaying a blank screen on some MD models
- MEMORY
- fixed a minor in memory packing operation
- added MEM_pack() here and there to avoid memory fragmentation
- VDP
- fixed getAdjustedVCounterInternal(..) which could return value > 255 in some rare situation
- moved VDP DMA busy checking on reset (better to do it before accessing VDP)
- VDP_setPlaneSize(..):
- added constraint on plane size
- fixed maps start address calculation (when VRAM setup is asked)
- minor change in VDP_drawImageEx(..) to do setTileMap(..) operation using CPU (DMA is actually slower here)
- added SYS_showFrameLoad() / SYS_hideFrameLoad() methods to monitor CPU frame load.
- always load font using CPU in reset process (safer)
- fixed String unit build when ENABLE_NEWLIB set (thanks doragasu)
- improved documentation in Joy unit (thanks Chilly Willy) and VDP (regarding DMA QUEUE usage specifically)
SAMPLE
- reduced memory usage on sample which use Bitmap mode by reducing DMA allocated memory
- SPRITE
- added SYS_showFrameLoad() showcase
SGDK 1.50 (april 2020)
COMPILER
- RESCOMP
- added ALIGN directive (read rescomp.txt for more information about it)
- added UNGROUP directive (read rescomp.txt for more information about it)
- added 'compression' and 'far' field to BIN resource
- replaced Map structure export by TileMap
- minor optimization in building IMAGE tilemap
plain tiles are now ignored (taken from system tiles) when using a base tile index offset for tilemap (mapbase parameter in IMAGE resource) - more flexible resource compilation
- ignore palette and priority for transparent pixel
- sprite can have their palette not starting at index 0
- reorganized resource data export order for better LZ4W compression and bank switch support
- added support for 1bpp and 2bpp indexed color images
- faster LZ4W tool call (embeded in rescomp now)
- preserve resource order for better BIN data compression with LZ4W
- more constrained sprite cutting process depending chosen optimization strategy
- minor fix to allow using bit 7 (color index >= 128) in IMAGE resource as priority bit in tilemap
- simplified / fixed binary compression block with alignment
- fixed a bug on possible duplicated resource export
- fixed Circle collision type export
- now return -1 as exit code on error
- replaced FileWriter by StringBuffer (faster and safer)
- minor changes and improvements to rescomp.txt file
- XGMTOOL
- fixed a small bug during sample conversion processing
- XGMROMBUILDER
- updated to last XGMTool and XGM driver version
- LZ4W
- fixed LZ4W compression which could failed in very are case
- BINTOS
- fixed data section (it was .text instead of .rodata)
- MAKEFILE
- updated 'release' target to generate symbol.txt file (always interesting to have)
- show more warnings
- forced no inlining of memset / memcpy methods to fix LTO agressive optimization issue
LIBRARY
- SYS
- added bank switch support using SSF2 mapper (allow ROM > 4MB)
- use ENABLE_BANK_SWITCH flag in config.h file to enable bank siwtch support in SGDK
- added FAR(..) directive to access a resource through bank switch if required
- added SYS_getBank(..) / SYS_setBank(..) methods
- moved RAM initialization to sys.c unit and added support for bank crossing (more control on it)
- minors changes to reset methods (simpler)
- added ROM and RAM constants (yeah, why not ^^)
- added bank switch support using SSF2 mapper (allow ROM > 4MB)
- SPRITE
- added sprite frame change event callback (using SPR_setFrameChangeCallback(..) method)
- added SPR_loadAllFrames(..) to (pre)load all frames data of a SpriteDefinition to VRAM
- removed unpack buffer (replaced by DMA buffer and new DMA_QUEUE_COPY method)
- fixed a small issue with delayed update
- fixed a bug on SPR_setDefinition(..) (can display glitches as some sprites weren't always properly hidden)
- fixed internal sprite link (could occasionaly let some phantom and glitched sprites visible)
- added out of range index detection for animation and frame (debug build only)
- DMA
- added new DMA buffer for easier and better DMA queue management
- added 'bufferSize' parameter to DMA_initEx(..) function
- added DMA_setBufferSize(..) and DMA_setBufferSizeToDefault() functions to set the temporary DMA buffer size
- added new DMA_QUEUE_COPY transfer method (TransferMethod enum) to copy data to a temporary buffer before transfer actually occurs
- added DMA_allocateAndQueueDma(..) function which return a temporary buffer and queue a DMA transfer from it
- added DMA_allocateTemp(..) and DMA_releaseTemp(..) methods to allocate memory from DMA temporary buffer (use that safely)
- added DMA_copyAndQueueDma(..) function which copy data to transfer to a temporary buffer and queue the DMA transfer
- added a new generic DMA_transfer(..) function
- added DMA_doCPUCopy(..) function to do a CPU copy to VRAM/CRAM/VSRAM
- added DMA_getMaxQueueSize() and DMA_setMaxQueueSize() to get and set the queue size.
- passed the DMA queue flush loop in assembly for better control (and also faster operation as GCC was dumb about it)
- safer DMA operation on DMA_doDMA(..)
- added DMA_initEx(..) and simplified DMA_init()
- added new DMA_DISABLED flag in config.h to completely disable DMA support in SGDK (for debug purpose)
- fix for HALT_Z80_ON_DMA (stupid typo)
- added new DMA buffer for easier and better DMA queue management
- VDP
- many refactoring (see refactoring section at bottom)
- TILE_USERMAXINDEX now take allocated VRAM for sprite engine in account !
- added TILE_SPRITEINDEX constant to get base tile index for the Sprite Engine
- added tilemap row update methods
- VDP_setTileMapDataRow(..) / VDP_setTileMapDataRowEx(..)
- VDP_setTileMapRow(..) / VDP_setTileMapRowEx(..)
- added tilemap column update methods
- VDP_setTileMapDataColumnFast(..) / VDP_setTileMapDataColumn(..) / VDP_setTileMapDataColumnEx(..)
- VDP_setTileMapColumn(..) / VDP_setTileMapColumnEx(..)
- added TransferMethod parameter to many tilemap set methods
- added tilemap wrapping support to VDP_setTileMap(..) and VDP_setTileMapEx(..) methods.
- added setupVram parameter to VDP_setPlaneSize(..) function
- removed vdpSpriteCacheQueue table (replaced by new DMA_QUEUE_COPY)
- re-introduced VDP_loadTileData(..) method in vdp_tile.c unit (no more assembly code for this one)
- moved font loading in VDP_resetScreen() method (fix)
- PALETTE
- fixed palette fading so it correctly trigger during vblank (avoid CRAM dot)
- fixed minor issue in palette fading (sometime not properly doing last fade step)
- MEMORY
- fixed MEM_getLargestFreeBlock(..) method
- added MEM_pack() method to help reducing memory fragmentation
- removed MEM_init() access as it's not safe to call it externally
- increased stack size to 0xA00
- MATHS
- fixed getLog2Int(..) method
- replaced sin tabs to use FIX32/FIX16 (thanks to FireRat for the generator)
- TYPES
- added new rorxx(..) / rolxx(..) functions which are correctly turned into ROR / ROL instruction when optimization are enabled
- Z80
- fixed Z80 enable restoration on DMA
- general cleanup and refactoring
SAMPLE
- Updated for SGDK 1.5 changes
- BENCHMARK
- added memory information at startup
- some changes to adapt to last SGDK
- SPRITE
- updated resources to use large backgrounds
- updated to support long scrolling > 512 px (vertical and horizontal) !
- as collision is not implemented, added physic settings using START button so we can play with vertical scrolling too
- enemies sprites frames preloaded and animated using new Sprite engine features
Showcase of SPR_loadAllFrames(..) and SPR_setFrameChangeCallback(..) methods
- XGMPlayer
- updated for easier integration in XGM ROM Builder tool
- added notes and tutorial references to README.txt
REFACTORING
- TILE_USERMAXINDEX now take allocated VRAM for sprite engine in account !
- _voidCallback --> VoidCallback
- _joyEventCallback --> JoyEventCallback
- PLAN_A --> BG_A
- PLAN_B --> BG_B
- PLAN_WINDOW --> WINDOW
- VDP_PLAN_A --> VDP_BG_A
- VDP_PLAN_B --> VDP_BG_B
- VDP_PLAN_WINDOW --> VDP_WINDOW
- all references to 'Plan' keyword --> 'Plane'
- VDPPlan --> VDPPlane
- VDP_clearPlan --> VDP_clearPlane
- VDP_getTextPlan --> VDP_getTextPlane
- VDP_setTextPlan --> VDP_setTextPlane
- VDP_setAPlanAddress --> VDP_setBGAAddress
- VDP_setBPlanAddress --> VDP_setBGBAddress
- VDP_setPlanSize --> VDP_setPlaneSize
- all references to 'Map' --> 'TileMap'
- Map --> TileMap
- unpackMap --> unpackTileMap
- allocateMap --> allocateTileMap
- VDP_setMap --> VDP_setTileMap
- VDP_setMapEx --> VDP_setTileMapEx
SGDK 1.41 (september 2019)
COMPILER
- RESCOMP
- added new sprite optimization options to SPRITE resource (see rescomp.txt for details)
- minor tweak on binary export order (can save some bytes with LZ4W compression)
- fixed resource duplication bug
- XGMTOOL
- fixed VGM loop
LIBRARY
- SYS
- safer SYS_setInterruptMaskLevel() so interrupt mask is not lost after SYS_enablesInts() call
- fixed/updated SGDK logo display code
- renamed getFPS() / getFPS_f() to SYS_getFPS() / SYS_getFPSAsFloat()
- DMA
- fixed possible DMA failure on some Megadrive when Z80 access 68K BUS at same time we trigger DMA
- minor fix on autoInc restoration after DMA_flushQueue()
- VDP
- tweaked default VRAM configuration so window can be freely used anywhere.
- added VDP_getAdjustedVCounter() method to have a consistent [0..255] V-Counter (avoiding rollback issue)
- tweaked up VDP_resetScreen() method
- added VDP_setHVLatching() and VDP_setDMAEnabled() methods
- PALETTE
- fixed VDP_getPaletteColors() and VDP_getPalette(..) methods (regression)
- fixed a bug with all palette fading methods (regression)
- renamed vdp_pal unit to pal unit (so all palette methods are now called PAL_xxx)
- JOY
- added JOY_reset() method to reset controller detection without clearing JOY state change event callback
- safer JOY_setSupport(..) / gun controller implementation
- more permissive mouse id detection in mouse pooling code
- fixed an issue where an EA 4-way multitap could be incorrectly detected
- TIMER
- safer waitSubTick(..) implementation during VInt.
- fixed getSubTick() method to take care of HV counter latching when light guns are used.
- RESOURCE
- added 2 alternate SGDK logo (free feel to use it)
- minor change on library resources name
- fixed version and added alias for old resource names
- added ENABLE_NEWLIB define in config.h file for those who want to use newlib within SGDK (you need to build it by yourself)
- changed u16 to bool where it makes sense to use bool (internally they are the same type, it's just for readability).
- minors tweaks, changes and fixes here and there
SAMPLE
- XGMPlayer
- updated to make it work with last SGDK (sprite engine difference mainly)
- SOUND
- reintroduced cry SFX test for XGM driver