From 4638927f134f133aff3875513188e38dee17be60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20W=C3=B3jcik?= Date: Sat, 25 Feb 2023 14:41:47 +0100 Subject: [PATCH] [SniffEmu] v1.1.0 --- SniffEmu/README.md | 15 +++++++++++---- SniffEmu/SniffEmu/Readme | 13 ++++++++++--- SniffEmu/SniffEmu/SniffEmu | Bin 9036 -> 9240 bytes SniffEmu/SniffEmu/Source/SniffEmu.c | 17 +++++++++++++++-- SniffEmu/SniffEmu/Source/SniffEmu.h | 8 ++++++-- SniffEmu/dist/SniffEmu.readme | 18 +++++++++++++----- 6 files changed, 55 insertions(+), 16 deletions(-) diff --git a/SniffEmu/README.md b/SniffEmu/README.md index 636a0af..dabc76b 100644 --- a/SniffEmu/README.md +++ b/SniffEmu/README.md @@ -1,6 +1,6 @@ # SniffEmu -CLI tool to "detect" if the system is running in emulator +Amiga CLI tool to "detect" if the system is running in emulator. ## Description @@ -8,12 +8,15 @@ SniffEmu is a small CLI tool to "detect" if the system is running in emulation-like environment, e.g. UAE. I use it to conditionally execute parts of Startup-Sequence, e.g. to can skip FBlit when the OS is booting on PiStorm. -Usage: SniffEmu HELP/S RTG/S MODE +Usage: SniffEmu HELP/S RTG/S SND/S MODE `MODE` is one of `EMU68`, `UAE` or `MUSASHI`. `RTG/S` allows you to specifically look for the emulator's RTG card, so you can e.g. set up the proper screen mode. +`SND/S` allows you to look for the emulator's sound card. This currently works +only with `UAESND` card in WinUAE. + Example: ``` @@ -47,6 +50,10 @@ AmigaOS 3.1+, MC68020+ ## Changelog +Version 1.1.0 (25.02.2023) + + * Added sound card detection. + Version 1.0.0 (16.02.2023) * Initial release. @@ -58,8 +65,8 @@ me through e-mail. ## Author -ScreenSaver is developed by [Tomek Wójcik](https://www.bthlabs.pl/). +SniffEmu is developed by [Tomek Wójcik](https://www.bthlabs.pl/). ## License -ScreenSaver is licensed under the MIT License. +SniffEmu is licensed under the MIT License. diff --git a/SniffEmu/SniffEmu/Readme b/SniffEmu/SniffEmu/Readme index 6898bcd..e574e97 100755 --- a/SniffEmu/SniffEmu/Readme +++ b/SniffEmu/SniffEmu/Readme @@ -4,11 +4,14 @@ SniffEmu is a small CLI tool to "detect" if the system is running in emulation-like environment, e.g. UAE. I use it to conditionally execute parts of Startup-Sequence, e.g. to can skip FBlit when the OS is booting on PiStorm. -Usage: SniffEmu HELP/S RTG/S MODE +Usage: SniffEmu HELP/S RTG/S SND/S MODE MODE is one of EMU68, UAE or MUSASHI. RTG/S allows you to specifically look for the emulator's RTG card, so you can e.g. set up the proper screen mode. +SND/S allows you to look for the emulator's sound card. This currently works +only with UAESND card in WinUAE. + Example: > SniffEmu EMU68 @@ -17,8 +20,8 @@ SniffEmu: Looking for board: 28019:-1... NOT FOUND > SniffEmu RTG UAE SniffEmu: Looking for board: 2011:96... FOUND -If the emulator (or RTG) was detected, the program will set the returncode to -WARN. Otherwise, it'll be OK. +If the emulator (or RTG/SND) was detected, the program will set the returncode +to WARN. Otherwise, it'll be OK. Example script: @@ -39,6 +42,10 @@ SniffEmu is licensed under the MIT License. Changelog --------- +Version 1.1.0 (25.02.2023) + + * Added sound card detection. + Version 1.0.0 (16.02.2023) * Initial release. diff --git a/SniffEmu/SniffEmu/SniffEmu b/SniffEmu/SniffEmu/SniffEmu index 983572fca340367c59645a2cd57d828ad8f14b28..7bf86104e819e4b70c5431e13bf6d314f2b6a66d 100755 GIT binary patch delta 1521 zcmZuvU1$_n6uvXFJ3D_nbMG3G>`%5gnnQH=E{Ro3?XCy-U0{!2fzj9ZwN`ReY^b!fqTTB3bcYOCMM8e>U)G_ zGl#mLAT2e%Ew+ul>KGOFr`p+(n(t>!P3q^og5ACwgjn?d6aV&XEHhv=*Cs)Zc_u#x8bp~&UdHoC4Oz8(Ky|{m9m7^E`M)4Fsv24G{EF6J)B!C|t zYP0!eAbo2iR=W%S{sqJ%cD_;vzBg0g%}QIv1I(NMWyXcLv;PhB{JQl=am5Nsmq5Ux zZi@D!^>-o&&P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Y$BS8`-88ShV zAP-5Al*l@@Qc7JkOn1>JjnTvO2t7vIX(#Qa{WM3<(P_E{_^>W-K($TaKZjJ=kS5!5 lVayxk{OV1-5&ytBRPIL*O6aemXWp1RfQ%H=LH2Bm@fW8%biDuo diff --git a/SniffEmu/SniffEmu/Source/SniffEmu.c b/SniffEmu/SniffEmu/Source/SniffEmu.c index bb449f9..1bf65bc 100755 --- a/SniffEmu/SniffEmu/Source/SniffEmu.c +++ b/SniffEmu/SniffEmu/Source/SniffEmu.c @@ -39,11 +39,12 @@ static char *MODE_NAME_EMU68 = "EMU68"; static char *MODE_NAME_UAE = "UAE"; static char *MODE_NAME_MUSASHI = "MUSASHI"; -#define TEMPLATE "HELP/S,RTG/S,MODE" +#define TEMPLATE "HELP/S,RTG/S,SND/S,MODE" typedef enum { OPT_HELP, OPT_RTG, + OPT_SND, OPT_MODE, OPT_COUNT } OPT_ARGS; @@ -65,10 +66,11 @@ int help() { printf( "\n" - "Usage: SniffEmu HELP/S RTG/S MODE\n" + "Usage: SniffEmu HELP/S RTG/S SND/S MODE\n" "\n" "HELP : Print this help\n" "RTG : Sniff the RTG board\n" + "SND : Sniff the sound card\n" "MODE : Specify the emulator to sniff\n" " Valid values: EMU68, UAE, MUSASHI\n" ); @@ -145,6 +147,17 @@ int main(int argc, char *argv[]) { printf("SniffEmu: Can't reliably sniff RTG on Musashi :(\n"); product = MUSASHI_RTG; } + } else if (opts[OPT_SND]) { + if (mode == MODE_EMU68) { + printf("SniffEmu: Can't sniff SND on EMU68 :(\n"); + product = EMU68_SND; + } else if (mode == MODE_UAE) { + manufacturer = UAE_SND_MANUFACTURER; + product = UAE_SND; + } else if (mode == MODE_MUSASHI) { + printf("SniffEmu: Can't sniff SND on Musashi :(\n"); + product = MUSASHI_SND; + } } result = find_board(manufacturer, product); diff --git a/SniffEmu/SniffEmu/Source/SniffEmu.h b/SniffEmu/SniffEmu/Source/SniffEmu.h index 9015fc8..2ee7662 100755 --- a/SniffEmu/SniffEmu/Source/SniffEmu.h +++ b/SniffEmu/SniffEmu/Source/SniffEmu.h @@ -1,17 +1,21 @@ #ifndef __SNIFFEMU_H__ #define __SNIFFEMU_H__ -#define VERSION "1.0.0" -#define DATE "16.02.2023" +#define VERSION "1.1.0" +#define DATE "25.02.2023" #define APP_VSTRING "$VER: SniffEmu " VERSION " (" DATE ")" #define EMU68_MANUFACTURER (0x6d73) #define EMU68_RTG (0x24) +#define EMU68_SND (0xff) #define UAE_MANUFACTURER (0x7db) #define UAE_RTG (0x60) +#define UAE_SND_MANUFACTURER (0x1966) +#define UAE_SND (0x02) #define MUSASHI_MANUFACTURER (0x7db) #define MUSASHI_INTERACTION (0x6b) #define MUSASHI_RTG (0x6b) +#define MUSASHI_SND (0xff) #endif diff --git a/SniffEmu/dist/SniffEmu.readme b/SniffEmu/dist/SniffEmu.readme index 08d6b71..42edbc3 100644 --- a/SniffEmu/dist/SniffEmu.readme +++ b/SniffEmu/dist/SniffEmu.readme @@ -1,8 +1,8 @@ -Short: CLI tool to "detect" if the system is running in emulator +Short: Check if system is running in emulator Author: Tomek Wójcik Uploader: Tomek Wójcik Type: util/sys -Version: 1.0.0 +Version: 1.1.0 Architecture: m68k-amigaos Requires: AmigaOS 3.1+, MC68020+ @@ -12,11 +12,14 @@ SniffEmu is a small CLI tool to "detect" if the system is running in emulation-like environment, e.g. UAE. I use it to conditionally execute parts of Startup-Sequence, e.g. to can skip FBlit when the OS is booting on PiStorm. -Usage: SniffEmu HELP/S RTG/S MODE +Usage: SniffEmu HELP/S RTG/S SND/S MODE MODE is one of EMU68, UAE or MUSASHI. RTG/S allows you to specifically look for the emulator's RTG card, so you can e.g. set up the proper screen mode. +SND/S allows you to look for the emulator's sound card. This currently works +only with UAESND card in WinUAE. + Example: > SniffEmu EMU68 @@ -25,8 +28,8 @@ SniffEmu: Looking for board: 28019:-1... NOT FOUND > SniffEmu RTG UAE SniffEmu: Looking for board: 2011:96... FOUND -If the emulator (or RTG) was detected, the program will set the returncode to -WARN. Otherwise, it'll be OK. +If the emulator (or RTG/SND) was detected, the program will set the returncode +to WARN. Otherwise, it'll be OK. Example script: @@ -47,6 +50,11 @@ SniffEmu is licensed under the MIT License. Changelog --------- +Version 1.1.0 (25.02.2023) + + * Added sound card detection. + Version 1.0.0 (16.02.2023) * Initial release. +