From 8af7244b73f2f15c5bde12c4af9cf97323fb0a87 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Mon, 25 Nov 2024 21:40:21 +0100 Subject: [PATCH 1/8] Remove the optr instance variable SWI_musicPart from the sound worker object, as it is only needed once inside of the method MUSIC_PLAY(). --- Appl/Games/GeoLadder/Main/sndwork.goc | 8 ++++---- Appl/Games/GeoLadder/Main/sndwork.goh | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Appl/Games/GeoLadder/Main/sndwork.goc b/Appl/Games/GeoLadder/Main/sndwork.goc index 6fdd18381..e3463a626 100644 --- a/Appl/Games/GeoLadder/Main/sndwork.goc +++ b/Appl/Games/GeoLadder/Main/sndwork.goc @@ -310,13 +310,14 @@ static const SWNoise SW_NOISES[] = { word e; word *p_music; + optr musicPart = NullOptr; Message msg; // Get the object pointer of the music part to play // We've locked in MSG_SOUND_WORKER_MUSIC_PLAY() and we'll unlock in MSG_SOUND_WORKER_MUSIC_STOP() - ChunkArrayGetElement(pself->SWI_musicData, pself->SWI_musicPartIndex, &pself->SWI_musicPart); - p_music = LMemDeref(pself->SWI_musicPart); + ChunkArrayGetElement(pself->SWI_musicData, pself->SWI_musicPartIndex, &musicPart); + p_music = LMemDeref(musicPart); // Patch message and object pointer (handle and chunk) for end of song notification - e = LMemGetChunkSize(pself->SWI_musicPart) / 2; + e = LMemGetChunkSize(musicPart) / 2; // Get the message to patch msg = ((pself->SWI_musicPartIndex + 1) < pself->SWI_musicPartCount) ? MSG_SOUND_WORKER_MUSIC_PLAY_EXEC @@ -377,7 +378,6 @@ static const SWNoise SW_NOISES[] = // We've locked in MSG_SOUND_WORKER_MUSIC_PLAY() MemUnlock(OptrToHandle(pself->SWI_musicData)); pself->SWI_musicData = NullOptr; - pself->SWI_musicPart = NullOptr; } } diff --git a/Appl/Games/GeoLadder/Main/sndwork.goh b/Appl/Games/GeoLadder/Main/sndwork.goh index 28a1ac4a5..b66b790fe 100644 --- a/Appl/Games/GeoLadder/Main/sndwork.goh +++ b/Appl/Games/GeoLadder/Main/sndwork.goh @@ -84,7 +84,6 @@ typedef struct @instance word SWI_modes = SW_MODE_OFF; @instance MemHandle SWI_musicHandle = NullHandle; @instance optr SWI_musicData = NullOptr; - @instance optr SWI_musicPart = NullOptr; @instance word SWI_musicPartCount = 0; @instance word SWI_musicPartIndex = 0; @instance word SWI_numNoiseVoices = 0; From 07971250848e1ea719a06dd1f53cdbb65042e074 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Tue, 26 Nov 2024 23:25:36 +0100 Subject: [PATCH 2/8] Cleanup comments. --- Appl/Games/GeoLadder/Main/sndwork.goc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Appl/Games/GeoLadder/Main/sndwork.goc b/Appl/Games/GeoLadder/Main/sndwork.goc index e3463a626..53a2c99d1 100644 --- a/Appl/Games/GeoLadder/Main/sndwork.goc +++ b/Appl/Games/GeoLadder/Main/sndwork.goc @@ -347,7 +347,7 @@ static const SWNoise SW_NOISES[] = * MSG_SOUND_WORKER_MUSIC_STOP * for SoundWorkerClass *********************************************************************** - * SYNOPSIS: Stop playing the music and unlock the music part. + * SYNOPSIS: Stop playing the music and unlock the music data. * CALLED BY: Internal or by patched notification in music data. * PARAMETERS: void ( void ) * RETURN: nothing @@ -356,8 +356,8 @@ static const SWNoise SW_NOISES[] = * STRATEGY: 1/ Stop playing the music. * 2/ Free the music handle. * 3/ Set the instance variable of the music handle to null. - * 4/ Unlock the music part. - * 5/ Set the instance variable of the music part to null. + * 4/ Unlock the music data. + * 5/ Set the instance variable of the music data to null. * * REVISION HISTORY: * Name Date Description From f3852dfa3f8936658909db3adf4b9b084a6a9e3a Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Thu, 28 Nov 2024 20:59:21 +0100 Subject: [PATCH 3/8] Move storing the ticks of multi noises in play instead of during add. Small cleanups. --- Appl/Games/GeoLadder/Main/sndwork.goc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Appl/Games/GeoLadder/Main/sndwork.goc b/Appl/Games/GeoLadder/Main/sndwork.goc index 53a2c99d1..126ed669b 100644 --- a/Appl/Games/GeoLadder/Main/sndwork.goc +++ b/Appl/Games/GeoLadder/Main/sndwork.goc @@ -512,15 +512,13 @@ static const SWNoise SW_NOISES[] = if (v->state == SW_NOISE_VOICE_STATE_PLAYING && ((currentTicks - v->startTicks) > SW_NOISES[v->noise].duration)) { v->state = SW_NOISE_VOICE_STATE_FREE; - v->noise = 0; // XXX: Unneeded? - v->startTicks = 0; // XXX: Unneeded? } } // Never play multiple noises of the same type at the same time for (i = 0; i < pself->SWI_numNoiseVoices; i++) { v = &pself->SWI_noiseVoices[i]; - if (v->noise == noise && v->state == SW_NOISE_VOICE_STATE_ADDED) + if (v->state == SW_NOISE_VOICE_STATE_ADDED && v->noise == noise) { return; } @@ -533,7 +531,6 @@ static const SWNoise SW_NOISES[] = { v->state = SW_NOISE_VOICE_STATE_ADDED; v->noise = noise; - v->startTicks = currentTicks; return; } } @@ -544,7 +541,6 @@ static const SWNoise SW_NOISES[] = if (v->noise == noise) { v->state = SW_NOISE_VOICE_STATE_ADDED; - v->startTicks = currentTicks; return; } } @@ -556,7 +552,6 @@ static const SWNoise SW_NOISES[] = { v->state = SW_NOISE_VOICE_STATE_ADDED; v->noise = noise; - v->startTicks = currentTicks; return; } } @@ -586,6 +581,7 @@ static const SWNoise SW_NOISES[] = ***********************************************************************/ @method SoundWorkerClass, MSG_SOUND_WORKER_NOISE_PLAY_MULTI { + dword currentTicks; word i; const SWNoise *n; SWNoiseVoice *v; @@ -594,20 +590,29 @@ static const SWNoise SW_NOISES[] = { return; } + // Get current up time ticks + currentTicks = TimerGetCount(); + // Search and play all noises for (i = 0; i < pself->SWI_numNoiseVoices; i++) { + // Get a pointer to our voice v = &pself->SWI_noiseVoices[i]; + // We only play voices with the added state if (v->state == SW_NOISE_VOICE_STATE_ADDED) { + // Verify we have a valid sound handle if (v->soundHandle == NullHandle) { continue; } + // Make sure no other noise is playing SoundStopMusicNote(v->soundHandle); + // Get the noise and play it n = &SW_NOISES[v->noise]; SoundReallocMusicNote(v->soundHandle, n->frequency, n->loudness, SSDTT_TICKS, n->duration, n->instrument, IT_STANDARD_TABLE); SoundPlayMusicNote(v->soundHandle, SP_STANDARD + SP_IMMEDIATE, 0, UNLOCK_ON_EOS); v->state = SW_NOISE_VOICE_STATE_PLAYING; + v->startTicks = currentTicks; } } } @@ -642,8 +647,9 @@ static const SWNoise SW_NOISES[] = { return; } - // Verify we have a valid sound handle + // Get a pointer to our voice v = &pself->SWI_noiseVoices[0]; + // Verify we have a valid sound handle if (v->soundHandle == NullHandle) { return; From ec52ef7897d71e609dde585dda9b09f1a5916c39 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Thu, 28 Nov 2024 22:56:36 +0100 Subject: [PATCH 4/8] Add one to y-position in clear text to prevent clearing pixels from the line above if middle font size is used. --- Appl/Games/GeoLadder/Main/visobj.goc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Appl/Games/GeoLadder/Main/visobj.goc b/Appl/Games/GeoLadder/Main/visobj.goc index 877cca3ba..7d0d9e8a4 100644 --- a/Appl/Games/GeoLadder/Main/visobj.goc +++ b/Appl/Games/GeoLadder/Main/visobj.goc @@ -167,7 +167,7 @@ static void _pascal ClearText(word pos, word len) x = (pos % SCN_COLS) * g.ns.font.width; y = (pos / SCN_COLS) * g.ns.font.height; GrFillRect(g.ns.gstateHandle, - x, y, + x, y + 1, x + len * g.ns.font.width, y + g.ns.font.height + 1); } From 93c023c0e568f816ef3c7140ec75cf034688f477 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Sat, 14 Dec 2024 21:47:07 +0100 Subject: [PATCH 5/8] Add unique noise for Lad new --- Appl/Games/GeoLadder/Main/sndwork.goc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Appl/Games/GeoLadder/Main/sndwork.goc b/Appl/Games/GeoLadder/Main/sndwork.goc index 126ed669b..f899c94a2 100644 --- a/Appl/Games/GeoLadder/Main/sndwork.goc +++ b/Appl/Games/GeoLadder/Main/sndwork.goc @@ -86,7 +86,7 @@ static const SWNoise SW_NOISES[] = { IP_SIDE_STICK, MIDDLE_G_SH, DYNAMIC_FFF, 5, 21 }, // Play Der recycle { IP_VIBRASLAP, MIDDLE_C, DYNAMIC_FFF, 3, 75 }, // Play Lad hooka { IP_ELECTRIC_SNARE, MIDDLE_C, DYNAMIC_FFF, 1, 30 }, // Play Lad dies - { IP_RIDE_BELL, MIDDLE_C, DYNAMIC_FFF, 2, 57 } // Play Lad new -> XXX: still to be found... + { IP_SHORT_GUIRO, LOW_E / 4, DYNAMIC_FFF, 2, 42 } // Play Lad new }; From 2ccabd1f535152b683c3307343382927e4c53083 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Sat, 14 Dec 2024 22:59:30 +0100 Subject: [PATCH 6/8] Add new VGA16 VESA modes for 960x540 and 960x600 --- Driver/Video/VGAlike/VGA16/vga16Admin.asm | 16 ++++++++++++++++ Driver/Video/VGAlike/VGA16/vga16StringTab.asm | 6 ++++++ Driver/Video/VGAlike/VGA16/vga16Tables.asm | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/Driver/Video/VGAlike/VGA16/vga16Admin.asm b/Driver/Video/VGAlike/VGA16/vga16Admin.asm index 44a80267a..2b53242dd 100644 --- a/Driver/Video/VGAlike/VGA16/vga16Admin.asm +++ b/Driver/Video/VGAlike/VGA16/vga16Admin.asm @@ -361,6 +361,18 @@ VidTestVESA_848x480_16 proc near ret VidTestVESA_848x480_16 endp +VidTestVESA_960x540_16 proc near + mov ax, VD_VESA_960x540_16 + call VidTestVESA + ret +VidTestVESA_960x540_16 endp + +VidTestVESA_960x600_16 proc near + mov ax, VD_VESA_960x600_16 + call VidTestVESA + ret +VidTestVESA_960x600_16 endp + VidTestVESA_1024_600_16 proc near mov ax, VD_VESA_1024_600_16 call VidTestVESA @@ -894,6 +906,8 @@ ifndef PRODUCT_WIN_DEMO word 480 ; VD_VESA_800x480_16 word 624 ; VD_VESA_832x624_16 word 480 ; VD_VESA_848x480_16 + word 540 ; VD_VESA_960x540_16 + word 600 ; VD_VESA_960x600_16 word 600 ; VD_VESA_1024_600_16 word 768 ; VD_VESA_1Kx768_16 @@ -933,6 +947,8 @@ ifndef PRODUCT_WIN_DEMO word 800 ; VD_VESA_800x480_16 word 832 ; VD_VESA_832x624_16 word 848 ; VD_VESA_848x480_16 + word 960 ; VD_VESA_960x540_16 + word 960 ; VD_VESA_960x600_16 word 1024 ; VD_VESA_1024_600_16 word 1024 ; VD_VESA_1Kx768_16 diff --git a/Driver/Video/VGAlike/VGA16/vga16StringTab.asm b/Driver/Video/VGAlike/VGA16/vga16StringTab.asm index 3deb5961c..ccf41d185 100644 --- a/Driver/Video/VGAlike/VGA16/vga16StringTab.asm +++ b/Driver/Video/VGAlike/VGA16/vga16StringTab.asm @@ -32,6 +32,8 @@ VD_VESA_720x400_16 enum VideoDevice VD_VESA_800x480_16 enum VideoDevice VD_VESA_832x624_16 enum VideoDevice VD_VESA_848x480_16 enum VideoDevice +VD_VESA_960x540_16 enum VideoDevice +VD_VESA_960x600_16 enum VideoDevice VD_VESA_1024_600_16 enum VideoDevice VD_VESA_1Kx768_16 enum VideoDevice @@ -82,6 +84,8 @@ ifndef PRODUCT_WIN_DEMO VGA800_480String, VGA832_624String, VGA848_480String, + VGA960_540String, + VGA960_600String, VGA1024_600String, UVGAString, ; VD_VESA_1Kx768_16 VGA1152_864String, @@ -120,6 +124,8 @@ LocalDefString VGA720_400String <"VESA Compatible SuperVGA: 720x400 64K-color",0 LocalDefString VGA800_480String <"VESA Compatible SuperVGA: 800x480 64K-color",0> LocalDefString VGA832_624String <"VESA Compatible SuperVGA: 832x624 64K-color",0> LocalDefString VGA848_480String <"VESA Compatible SuperVGA: 848x480 64K-color",0> +LocalDefString VGA960_540String <"VESA Compatible SuperVGA: 960x540 64K-color",0> +LocalDefString VGA960_600String <"VESA Compatible SuperVGA: 960x600 64K-color",0> LocalDefString VGA1024_600String <"VESA Compatible SuperVGA: 1024x600 64K-color",0> LocalDefString UVGAString <"VESA Compatible SuperVGA: 1024x768 64K-color",0> diff --git a/Driver/Video/VGAlike/VGA16/vga16Tables.asm b/Driver/Video/VGAlike/VGA16/vga16Tables.asm index 768f2c4c9..b910944db 100644 --- a/Driver/Video/VGAlike/VGA16/vga16Tables.asm +++ b/Driver/Video/VGAlike/VGA16/vga16Tables.asm @@ -158,6 +158,8 @@ ifndef PRODUCT_WIN_DEMO nptr offset VidTestVESA_800x480_16 ; VD_VESA_800x480_16 nptr offset VidTestVESA_832x624_16 ; VD_VESA_832x624_16 nptr offset VidTestVESA_848x480_16 ; VD_VESA_848x480_16 + nptr offset VidTestVESA_960x540_16 ; VD_VESA_960x540_16 + nptr offset VidTestVESA_960x600_16 ; VD_VESA_960x600_16 nptr offset VidTestVESA_1024_600_16 ; VD_VESA_1024_600_16 nptr offset VidTestUVGA16 ; VD_VESA_1Kx768_16 @@ -198,6 +200,8 @@ ifndef PRODUCT_WIN_DEMO nptr offset VidSetVESA ; VD_VESA_800x480_16 nptr offset VidSetVESA ; VD_VESA_832x624_16 nptr offset VidSetVESA ; VD_VESA_848x480_16 + nptr offset VidSetVESA ; VD_VESA_960x540_16 + nptr offset VidSetVESA ; VD_VESA_960x600_16 nptr offset VidSetVESA ; VD_VESA_1024_600_16 nptr offset VidSetVESA ; VD_VESA_1Kx768_16 From 46f7dee2deceb8e943053082c5408e1a9ccfb312 Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Thu, 2 Jan 2025 14:09:40 +0100 Subject: [PATCH 7/8] Update revision file --- Driver/Video/VGAlike/VGA16/vga16.rev | 69 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/Driver/Video/VGAlike/VGA16/vga16.rev b/Driver/Video/VGAlike/VGA16/vga16.rev index 5d4bc25ba..7186e016d 100644 --- a/Driver/Video/VGAlike/VGA16/vga16.rev +++ b/Driver/Video/VGAlike/VGA16/vga16.rev @@ -1,34 +1,35 @@ -R 6.0.0.0 <15:25:29 Nov 19, 2023> -R 6.0.0.13 <10:18:22 Nov 9, 2021> -R 6.0.0.12 <17:34:19 Nov 8, 2021> -R 6.0.0.11 <10:27:55 May 12, 2021> -R 6.0.0.10 <20:03:19 Nov 22, 2020> -R 6.0.0.6 <14:07:12 Nov 15, 2020> -R 6.0.0.1 <15:25:54 Feb 2, 2020> -R 4.1.0.0 <15:25:54 Feb 10, 2004> -R 4.0.2.0 <10:34:33 Sep 25, 2002> -R 4.0.1.0 <11:51:30 Jul 11, 2002> -R 3.1.30.0 <14:53:58 Oct 30, 2000> -R 3.1.212.0 <12:35:06 Jul 11, 2000> -R 3.1.211.0 <16:30:40 Jun 12, 2000> -R 3.1.2.0 <15:12:17 Mar 29, 2000> <> -R 3.1.01.0 <14:54:00 Mar 24, 2000> -R 3.1.40.0 <19:52:04 Mar 14, 19100> <> -R 3.1.39.0 <23:53:01 Mar 1, 19100> <> -R 3.1.38.0 <15:47:51 Feb 23, 19100> <> -R 3.1.37.0 <16:12:19 Feb 14, 19100> <> -R 3.1.36.0 <14:09:29 Feb 5, 19100> <> -R 3.1.35.0 <12:41:39 Jan 28, 19100> <> -R 3.1.34.0 <13:15:59 Jan 14, 19100> <> -R 3.1.33.0 <15:20:16 Jan 5, 19100> <> -R 3.1.32.0 <15:02:14 Jan 5, 19100> <> -R 3.1.31.0 <21:07:47 Dec 8, 1999> <> -R 3.1.30.0 <12:54:22 Nov 30, 1999> <> -R 3.1.29.0 <18:50:05 Nov 17, 1999> <> -R 3.1.28.0 <19:40:29 Nov 9, 1999> <> -R 3.1.27.0 <16:38:01 Oct 29, 1999> <> -R 3.1.26.0 <15:34:59 Oct 29, 1999> <> -R 3.1.25.0 <17:57:25 Oct 16, 1999> <> -R 3.1.24.0 <14:01:14 Oct 8, 1999> -P 0.0 <18:06:50 Sep 28, 1998> <> -R 0.0.0.0 <18:06:50 Sep 28, 1998> <> +R 6.0.1.0 <23:01:48 Jan 1, 2025> +R 6.0.0.0 <15:25:29 Nov 19, 2023> +R 6.0.0.13 <10:18:22 Nov 9, 2021> +R 6.0.0.12 <17:34:19 Nov 8, 2021> +R 6.0.0.11 <10:27:55 May 12, 2021> +R 6.0.0.10 <20:03:19 Nov 22, 2020> +R 6.0.0.6 <14:07:12 Nov 15, 2020> +R 6.0.0.1 <15:25:54 Feb 2, 2020> +R 4.1.0.0 <15:25:54 Feb 10, 2004> +R 4.0.2.0 <10:34:33 Sep 25, 2002> +R 4.0.1.0 <11:51:30 Jul 11, 2002> +R 3.1.30.0 <14:53:58 Oct 30, 2000> +R 3.1.212.0 <12:35:06 Jul 11, 2000> +R 3.1.211.0 <16:30:40 Jun 12, 2000> +R 3.1.2.0 <15:12:17 Mar 29, 2000> <> +R 3.1.01.0 <14:54:00 Mar 24, 2000> +R 3.1.40.0 <19:52:04 Mar 14, 19100> <> +R 3.1.39.0 <23:53:01 Mar 1, 19100> <> +R 3.1.38.0 <15:47:51 Feb 23, 19100> <> +R 3.1.37.0 <16:12:19 Feb 14, 19100> <> +R 3.1.36.0 <14:09:29 Feb 5, 19100> <> +R 3.1.35.0 <12:41:39 Jan 28, 19100> <> +R 3.1.34.0 <13:15:59 Jan 14, 19100> <> +R 3.1.33.0 <15:20:16 Jan 5, 19100> <> +R 3.1.32.0 <15:02:14 Jan 5, 19100> <> +R 3.1.31.0 <21:07:47 Dec 8, 1999> <> +R 3.1.30.0 <12:54:22 Nov 30, 1999> <> +R 3.1.29.0 <18:50:05 Nov 17, 1999> <> +R 3.1.28.0 <19:40:29 Nov 9, 1999> <> +R 3.1.27.0 <16:38:01 Oct 29, 1999> <> +R 3.1.26.0 <15:34:59 Oct 29, 1999> <> +R 3.1.25.0 <17:57:25 Oct 16, 1999> <> +R 3.1.24.0 <14:01:14 Oct 8, 1999> +P 0.0 <18:06:50 Sep 28, 1998> <> +R 0.0.0.0 <18:06:50 Sep 28, 1998> <> From 0e42c88c3d60f7f6840ed960a2bafab34903781c Mon Sep 17 00:00:00 2001 From: Andreas Bollhalder Date: Thu, 2 Jan 2025 14:20:27 +0100 Subject: [PATCH 8/8] Update revision file --- Appl/Games/GeoLadder/geoladder.rev | 1 + 1 file changed, 1 insertion(+) diff --git a/Appl/Games/GeoLadder/geoladder.rev b/Appl/Games/GeoLadder/geoladder.rev index b23e8f302..7ae5227ce 100644 --- a/Appl/Games/GeoLadder/geoladder.rev +++ b/Appl/Games/GeoLadder/geoladder.rev @@ -1,3 +1,4 @@ +R 0.7.1.0 <14:16:44 Jan 2, 2025> R 0.7.0.977 <22:32:15 Nov 15, 2024> <> R 0.7.0.976 <22:22:29 Nov 15, 2024> <> R 0.7.0.975 <0:02:16 Nov 15, 2024> <>