215 Commits

Author SHA1 Message Date
bbbbbr
5794b92df4 Docs: Update for NES fill_bkg_rect fix commit 2025-12-27 17:50:29 -08:00
bbbbbr
3e43f3e6b3 Docs: Update Changelog and Release Notes for 4.5.0 release 2025-12-21 02:03:29 -08:00
bbbbbr
37283004f1 Docs: toolchain settings update 2025-12-06 02:22:00 -08:00
bbbbbr
29e436c835 Docs: Update changelog / migration through Dec 5, 2025
- Enable readable anchors in doxyfile
- Minor MegaDuck printer docs updates
- ZX0 compression updates
2025-12-06 02:19:42 -08:00
bbbbbr
c9c1249ff8 Examples: new sram bank pragma example
- Minor related docs updates
2025-11-26 16:06:10 -08:00
bbbbbr
15c99f0929 Docs: fix makebin SRAM bank param docs
Also harmonize all cart RAM to cart SRAM
2025-11-26 02:04:20 -08:00
bbbbbr
1e1a7cc415 Docs: explanation of new dataseg pragma and sfr for HRAM vars (#827) 2025-10-30 03:07:13 -07:00
bbbbbr
cd459e8e0b Docs: Minor edits for updated APA mode ISRs, SMS/GG VDP migration note 2025-07-25 01:04:21 -07:00
Michel Iwaniec
5fb3f54bba NES: Simplify description of palette fading caveat in docs 2025-05-14 08:21:11 +01:00
bbbbbr
fb7d08c760 Docs: 4.4.0 release notes month 2025-05-09 23:52:22 -07:00
bbbbbr
54ca569a8b Docs: update toolchain settings 2025-05-09 23:43:28 -07:00
Michel Iwaniec
5acc7cfbae NES: Improve TIMER interrupt emulation (#774)
- Move TIM ISR emulation to dedicated function .tim_emulation and dedicated file timer_isr.s

- Make TIM ISR emulation save entirety of ALL_REGTEMPS_BEGIN to ALL_REGTEMPS_END

- Improve emulation to allow average TIM rate to be faster compared to vblank rate

- Add support for consistent average TIM rate on PAL, for a less system-dependent timer

- Add support for different base dividers defined by GB-like TAC_REG variable

- Add defines values for "vblank parity mode" to global.s and nes.h

- Update crt0 init code to set TMA_REG to vblank parity mode correctly for PAL/Dendy

- Update documentation, describing the improved GB TIM emulation and vblank parity mode

- Update cross-platform IRQ example to better showcase the emulation
2025-05-06 11:40:17 +01:00
bbbbbr
19c384da19 Bankpack: Fix bug with large file count
- File descriptor/handle leak from non-closure during format detection
- Also don't open the file twice, just once
2025-05-02 18:03:28 -07:00
bbbbbr
f831132b66 Bankpack: Fix incorrect array growth size (credit RodrigoCard)
- Also same issue in romusage, makecom
2025-05-02 11:36:52 -07:00
Michel Iwaniec
2b633b83cd NES: Refactor display_on / display_off and deferred isr code (#768)
- Move code for deferred isr buffer building to separate function .deferred_isr_run in file deferred_isr.s

- Introduce function .deferred_isr_reset to write shadow regs as first (VBL) buffer entry

- Add new subroutine .deferred_isr_reset_and_init that runs .deferred_isr_reset and .deferred_isr_run twice

- Drain buffer when DISPLAY_OFF is called, by making sure a single NMI execution happens before screen is turned off in vblank

- Change DISPLAY_OFF to write only DISPLAY_OFF flag and PPUMASK, but leave shadow_PPU_MASK unchanged

- Call .deferred_isr_reset_and_init in DISPLAY_ON when display changes from off to on

- Make DISPLAY_ON run run VBL / LCD handlers to reinitialize buffers when display switches from off to on

- Change early-out in NMI handler to rely on DISPLAY_OFF flag instead of shadow_PPUMASK

- Remove mentioned of manual-draining caveat in docs, as it no longer applies

- Add minor size/speed optimization of frame counter increment in NMI, to prevent branch penalties / incorrect system detection
2025-04-27 10:38:06 +01:00
bbbbbr
0f073ab408 Docs: text changelog, other minor updates 2025-04-25 00:04:39 -07:00
Michel Iwaniec
03613b5550 NES: Make sure TIM ISR handlers are thread-safe (#760)
* NES: Make sure TIM ISR handlers are thread-safe

- Backup and restore REGTEMP area when calling TIM ISR in vblank

- Update irq example to use #pragma nooverlay for tim handler

- Add warning and explanation about having to use #pragma for TIM handlers in NES section of docs

- Add @anchor to docs, and a code example for #pragma nooverlay

- Update irq.c with `#pragma nooverlay` only being applied if NINTENDO_NES is defined

- Add more detailed comment of `#pragma nooverlay` in irq.c

- Add reference to docs in gb.h

- Add similar reference to nes.h
2025-04-22 08:36:41 +01:00
bbbbbr
f33c2b6e3a Docs: start of 4.4.0 release and migration notes, toolchain settings
- Minor LCC comment for deprecated flag
2025-04-21 02:42:26 -07:00
Michel Iwaniec
ac571c1dab NES: Align coordinates and scanline counting in LCD ISR implementation with GB, add SCX / SCY / LYC defines (#755)
NES: Align coordinates and scanline counting in LCD ISR implementation with GB, add SCX / SCY / LYC defines

- Change definition of _lcd_scanline to be -1 less than current, aligning with GB LYC register

- Change definition of _bkg_scroll_y to match GB's SCY, being relative to current scanline

- Refactor do_hblank_writes, delay_fractional and delay_to_scanline subroutines in crt0

- Add "#define LYC_REG" and "#define LY_REG" as aliases of _lcd_scanline

- Add #defines for SCX and SCY to alias _bkg_scroll_x / _bkg_scroll_y shadow variables

- Change text scroller example to use LYC_REG / SCX / SCY instead of _lcd_scanline / move_bkg, remove redundant #ifdefs

- Add subtle shake in y direction to text scroller example, to check that GB / NES coordinates match

- Update "From Game Boy to NES" section's descriptions of LCD handlers

- Update "Migrating to new GBDK versions" with a short description of bkg_scroll_y changing from absolute to relative Y coordinates for 4.4.0
2025-03-30 23:43:39 +01:00
Michel Iwaniec
4a714bec8c NES: Move .nes header functionality out of makebin (#750)
NES: Move .nes header functionality out of makebin

- Move all .nes header related functionality into a new utility gbdk-support/makenes

- Update LCC to use makenes for .postproc member of build process, with mapper30 header parameters hard-coded for now

- Update makefiles to build makenes

- Add Makefile commands to generate output for the toolchain settings doc page

- Add documentation section for makenes in 06_toolchain.md
2025-03-21 00:00:13 +00:00
Michel Iwaniec
37186a5b7a NES: Timer interrupt emulation + support for set_interrupts(...)
- Add add_TIM / remove_TIM functions to nes.h

- Refactor implementation in lcd.s to support add_TIM / remove_TIM

- Add TMA_REG / TIMA_REG / TAC_REG vars to emulate GB hardware timer register

- Add call to TIM function at end of NMI handler in crt0.s, and make it use TMA_REG / TIMA_REG vars

- Add implementation for set_interrupts in lcd.s, replacing JMP instruction with RTS when disabled

- Enable NES target in examples/cross-platform/irq and replace delay(1000) call with 60 vsyncs

- Update examples/cross-platform/scroller and examples/cross-platform/irq to use set_interrupts

- Update documentation to describe use-cases and limitations of TIM handler
2025-03-09 03:07:44 +00:00
bbbbbr
a994a6acf5 Docs: improvements to MBC header chart to clarify cart SRAM, battery and saving (#737) 2024-12-29 22:19:21 -08:00
bbbbbr
5c190e014b Update and correct docs and comments related to MBC7
- Source info (pandocs) looks accidentally wrong
- No Rumble, no RAM, no Battery - just ACCELEROMETER and EEPROM
2024-11-09 23:03:37 -08:00
bbbbbr
6c0995334f Docs: misc links, tool output
- Add Banjo for SMS/GG music driver
- Links to Mega Duck tech docs
- Clarify that png2asset -spr16x16 is for MSX only
2024-08-08 19:55:48 -07:00
bbbbbr
8b2971020d Docs: MBC chart: Add SRAm max size 2024-07-14 02:58:59 -07:00
bbbbbr
f369790c01 Docs: migration notes: add missing NES context for chagned api call 2024-06-08 00:16:51 -07:00
Michel Iwaniec
47680ea185 * Docs: Update NES section of "supported consoles" with typo / grammar fixes 2024-06-08 07:42:09 +01:00
bbbbbr
d3de434ed2 Merge pull request #692 from michel-iwaniec/update_release_notes_430
* Update release notes to be a bit more verbose for NES
2024-06-07 18:01:36 -07:00
bbbbbr
f167be6083 docs: release notes: remove bcd entry for GB 2024-06-07 18:01:13 -07:00
bbbbbr
cdc23c667e Docs: FAQ: add explanation for undefined global linker warning, re-arrange a bit 2024-06-07 17:58:25 -07:00
Michel Iwaniec
706441ec22 * Update release notes to be a bit more verbose for NES 2024-06-08 00:31:03 +01:00
bbbbbr
0368b13157 Docs: 4.3: add changes from recent commits 2024-06-07 00:15:36 -07:00
bbbbbr
b24c021527 png2asset: if using either 1bpp flag, enable the other one (#680)
* png2asset: if using either 1bpp flag, enable the other one
* docs: update for png2asset help output
2024-05-29 00:11:07 -07:00
Michel Iwaniec
0b424fafc7 NES: Add deferred hblank system for fake LCD ISRs
* Refactor .delay_to_lcd_scanline to not use Y register. Remove outdated comments.
* Move .jmp_to_LCD_isr call to vsync routine, and have it copy shadow PPU register values to a buffer
* Add MAX_LCD_ISR_CALLS define to limit the deferred PPU register write buffer size
* Add .do_lcd_ppu_reg_writes for writing buffer aligned to hblank, and calls to .delay_to_lcd_scanline
* Make .do_lcd_ppu_reg_write restore Y-scroll for start-of-frame after every update, to mitigate glitches in lag frames
* Have LCD at scanline#0 be treated as a special-case, where VBL shadow values are replaced without adding to the buffer
* Re-introduce variable to skip NMI as __crt0_disableNMI, and set it in vsync during buffer building

Update text_scroller example:
* Fix NES-version of code to do multiple splits like the other platforms do
* Fill nametable with '*' to make splits more visible
* TODO: Find out why fill_bkg_rect isn't working on GB
2024-05-14 23:54:55 +01:00
bbbbbr
bb2a8ce2de Update release notes 2024-05-13 22:44:01 -07:00
bbbbbr
47dfad6672 Docs: 4.3 sms/gg palette notes 2024-05-09 19:53:04 -07:00
bbbbbr
e1c3b2d58f Docs: minor updates to changelog 2024-05-08 12:17:20 -07:00
Michel Iwaniec
3bc47f3191 Docs: Correct information NES part of "Supported consoles"
* Remove "(the mapper2 subset of Mapper30)" comment (single-screen mirroring is not supported by Mapper2)
2024-05-06 22:12:57 +01:00
bbbbbr
ea8ff534b3 Docs: 4.3.0: first pass at Release Notes, Changelog, Migration notes 2024-05-06 00:38:56 -07:00
bbbbbr
c0e6d70562 Docs: 4.3.0: start of changelist, updates for toolchain changes 2024-05-05 15:41:22 -07:00
bbbbbr
4c00b176df Docs: sms/gg banking notes, coding guidelines, GBDKDIR, etc 2024-05-01 03:41:02 -07:00
bbbbbr
7a998a184e Docs: More historical release notes 2024-01-31 03:09:45 -08:00
bbbbbr
65d5f1b233 - Remove hUGEbuild
- VScode c config for better GBDK var detection
- Recommend CURRENT_BANK over _current_bank
- FAQ entry about HIDE_LEFT_COLUMN
- More info about using the add_JOY() interrupt and improve docs for some linked constants
- Improve docs for reset()
- Improve docs for hblank_copy()
- Improve docs for base_prop metasprite parameter
- Improve docs for initrand() a bit
2024-01-23 03:13:16 -08:00
bbbbbr
c5ffc33c14 tools: add romusage 2024-01-02 03:19:57 -08:00
bbbbbr
8480767b89 Docs: updates about debugging, typos 2023-12-22 01:39:36 -08:00
Michel Iwaniec
15e1730d2d Add warning about smaller RAM resources on NES 2023-11-18 01:49:52 +00:00
bbbbbr
01fc176bd7 Docs: FAQ: some info about common warnings
docs: set_sprite_prop() Remove non-constant example and change constant exampel to use bitwise or instead of addition
2023-10-03 00:00:16 -07:00
bbbbbr
26f2f56e02 Example: gb hi-color: add note about sprite limit per line 2023-08-15 09:47:08 -07:00
bbbbbr
22b2cb88ea Update changelog/release notes for recent commits 2023-08-08 23:06:00 -07:00
bbbbbr
e36fbe65df Docs: typos, misc and sdcc manual update 2023-08-07 23:12:11 -07:00