Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NDS date and time counters, fix remaining BlocksDS warnings. #527

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/nds-blocksds/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ arch/nds/arm7/source/%.c.o: arch/nds/arm7/source/%.c
$(if ${V},,@echo " CC.7 " $<)
${CC} -MD -Os -std=gnu11 -specs=$(BLOCKSDS)/sys/crts/ds_arm7.specs \
-Wall -Wno-unused-macros -mcpu=arm7tdmi \
-mthumb $(ARM7_INCLUDES) \
-mthumb $(ARM7_INCLUDES) -DCONFIG_BLOCKSDS \
-ffunction-sections -fdata-sections -fomit-frame-pointer \
-c $< -o $@
#
Expand Down
6 changes: 5 additions & 1 deletion arch/nds/arm7/source/arm7main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ int main() {

irqInit();
// Start the RTC tracking IRQ
#ifdef CONFIG_BLOCKSDS
initClockIRQTimer(3);
#else
initClockIRQ();
#endif
fifoInit();
touchInit();

Expand All @@ -100,7 +104,7 @@ int main() {
irqSet(IRQ_VCOUNT, VcountHandler);
irqSet(IRQ_VBLANK, VblankHandler);

irqEnable(IRQ_VBLANK | IRQ_VCOUNT);
irqEnable(IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);

setPowerButtonCB(powerButtonCB);

Expand Down
13 changes: 8 additions & 5 deletions arch/nds/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ static struct {
enum Subscreen_Mode last_subscreen_mode;
enum Subscreen_Mode subscreen_mode;

// Initialized with a pointer to static libnds memory via keyboardInit.
static Keyboard *kb;

// Forward declarations
static void nds_keyboard_scroll_in(void);
static void nds_keyboard_scroll_out(void);
Expand Down Expand Up @@ -181,12 +184,10 @@ static void nds_subscreen_scaled_init(void)

static void nds_subscreen_keyboard_init(void)
{
Keyboard *kb = keyboardGetDefault();

// BG0: Keyboard 256x512 text, map following tiles (45056 bytes total)
// Clear the keyboard area before drawing it.
dmaFillWords(0, BG_MAP_RAM(20), 4096);
keyboardInit(kb, 0, BgType_Text4bpp, BgSize_T_256x512, 20, 0, true, true);
kb = keyboardInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x512, 20, 0, true, true);
bgSetPriority(0, 1);
kb->scrollSpeed = 7;
transition.time = 0;
Expand Down Expand Up @@ -312,7 +313,8 @@ void nds_video_do_transition(void)

static void nds_keyboard_scroll_in(void)
{
Keyboard *kb = keyboardGetDefault();
if(!kb)
return;
if(transition.time == 0)
{
// Show the background.
Expand Down Expand Up @@ -341,7 +343,8 @@ static void nds_keyboard_scroll_in(void)

static void nds_keyboard_scroll_out(void)
{
Keyboard *kb = keyboardGetDefault();
if(!kb)
return;
if(transition.time == 0)
kb->visible = 0;

Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ FIXES
+ TODO: 2.94 enables board message clipping bugfixes from 2.93b.


GIT - MZX 2.93d

USERS

+ Fixed date and time counters on NDS (missing IRQ_NETWORK).

DEVELOPERS


February 28th, 2025 - MZX 2.93c

Yes, the text input bug and show thing keys are fixed now. :)
Expand Down
Loading