[SniffEmu] v1.1.0
This commit is contained in:
parent
2afb5eba89
commit
4638927f13
|
@ -1,6 +1,6 @@
|
||||||
# SniffEmu
|
# 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
|
## 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
|
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.
|
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
|
`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
|
specifically look for the emulator's RTG card, so you can e.g. set up the
|
||||||
proper screen mode.
|
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:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -47,6 +50,10 @@ AmigaOS 3.1+, MC68020+
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
Version 1.1.0 (25.02.2023)
|
||||||
|
|
||||||
|
* Added sound card detection.
|
||||||
|
|
||||||
Version 1.0.0 (16.02.2023)
|
Version 1.0.0 (16.02.2023)
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
@ -58,8 +65,8 @@ me through e-mail.
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
ScreenSaver is developed by [Tomek Wójcik](https://www.bthlabs.pl/).
|
SniffEmu is developed by [Tomek Wójcik](https://www.bthlabs.pl/).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
ScreenSaver is licensed under the MIT License.
|
SniffEmu is licensed under the MIT License.
|
||||||
|
|
|
@ -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
|
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.
|
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
|
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.
|
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:
|
Example:
|
||||||
|
|
||||||
> SniffEmu EMU68
|
> SniffEmu EMU68
|
||||||
|
@ -17,8 +20,8 @@ SniffEmu: Looking for board: 28019:-1... NOT FOUND
|
||||||
> SniffEmu RTG UAE
|
> SniffEmu RTG UAE
|
||||||
SniffEmu: Looking for board: 2011:96... FOUND
|
SniffEmu: Looking for board: 2011:96... FOUND
|
||||||
|
|
||||||
If the emulator (or RTG) was detected, the program will set the returncode to
|
If the emulator (or RTG/SND) was detected, the program will set the returncode
|
||||||
WARN. Otherwise, it'll be OK.
|
to WARN. Otherwise, it'll be OK.
|
||||||
|
|
||||||
Example script:
|
Example script:
|
||||||
|
|
||||||
|
@ -39,6 +42,10 @@ SniffEmu is licensed under the MIT License.
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Version 1.1.0 (25.02.2023)
|
||||||
|
|
||||||
|
* Added sound card detection.
|
||||||
|
|
||||||
Version 1.0.0 (16.02.2023)
|
Version 1.0.0 (16.02.2023)
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
|
Binary file not shown.
|
@ -39,11 +39,12 @@ static char *MODE_NAME_EMU68 = "EMU68";
|
||||||
static char *MODE_NAME_UAE = "UAE";
|
static char *MODE_NAME_UAE = "UAE";
|
||||||
static char *MODE_NAME_MUSASHI = "MUSASHI";
|
static char *MODE_NAME_MUSASHI = "MUSASHI";
|
||||||
|
|
||||||
#define TEMPLATE "HELP/S,RTG/S,MODE"
|
#define TEMPLATE "HELP/S,RTG/S,SND/S,MODE"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OPT_HELP,
|
OPT_HELP,
|
||||||
OPT_RTG,
|
OPT_RTG,
|
||||||
|
OPT_SND,
|
||||||
OPT_MODE,
|
OPT_MODE,
|
||||||
OPT_COUNT
|
OPT_COUNT
|
||||||
} OPT_ARGS;
|
} OPT_ARGS;
|
||||||
|
@ -65,10 +66,11 @@ int help() {
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
"\n"
|
"\n"
|
||||||
"Usage: SniffEmu HELP/S RTG/S MODE\n"
|
"Usage: SniffEmu HELP/S RTG/S SND/S MODE\n"
|
||||||
"\n"
|
"\n"
|
||||||
"HELP : Print this help\n"
|
"HELP : Print this help\n"
|
||||||
"RTG : Sniff the RTG board\n"
|
"RTG : Sniff the RTG board\n"
|
||||||
|
"SND : Sniff the sound card\n"
|
||||||
"MODE : Specify the emulator to sniff\n"
|
"MODE : Specify the emulator to sniff\n"
|
||||||
" Valid values: EMU68, UAE, MUSASHI\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");
|
printf("SniffEmu: Can't reliably sniff RTG on Musashi :(\n");
|
||||||
product = MUSASHI_RTG;
|
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);
|
result = find_board(manufacturer, product);
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
#ifndef __SNIFFEMU_H__
|
#ifndef __SNIFFEMU_H__
|
||||||
#define __SNIFFEMU_H__
|
#define __SNIFFEMU_H__
|
||||||
|
|
||||||
#define VERSION "1.0.0"
|
#define VERSION "1.1.0"
|
||||||
#define DATE "16.02.2023"
|
#define DATE "25.02.2023"
|
||||||
|
|
||||||
#define APP_VSTRING "$VER: SniffEmu " VERSION " (" DATE ")"
|
#define APP_VSTRING "$VER: SniffEmu " VERSION " (" DATE ")"
|
||||||
|
|
||||||
#define EMU68_MANUFACTURER (0x6d73)
|
#define EMU68_MANUFACTURER (0x6d73)
|
||||||
#define EMU68_RTG (0x24)
|
#define EMU68_RTG (0x24)
|
||||||
|
#define EMU68_SND (0xff)
|
||||||
#define UAE_MANUFACTURER (0x7db)
|
#define UAE_MANUFACTURER (0x7db)
|
||||||
#define UAE_RTG (0x60)
|
#define UAE_RTG (0x60)
|
||||||
|
#define UAE_SND_MANUFACTURER (0x1966)
|
||||||
|
#define UAE_SND (0x02)
|
||||||
#define MUSASHI_MANUFACTURER (0x7db)
|
#define MUSASHI_MANUFACTURER (0x7db)
|
||||||
#define MUSASHI_INTERACTION (0x6b)
|
#define MUSASHI_INTERACTION (0x6b)
|
||||||
#define MUSASHI_RTG (0x6b)
|
#define MUSASHI_RTG (0x6b)
|
||||||
|
#define MUSASHI_SND (0xff)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
18
SniffEmu/dist/SniffEmu.readme
vendored
18
SniffEmu/dist/SniffEmu.readme
vendored
|
@ -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 <contact@bthlabs.pl>
|
Author: Tomek Wójcik <contact@bthlabs.pl>
|
||||||
Uploader: Tomek Wójcik <contact@bthlabs.pl>
|
Uploader: Tomek Wójcik <contact@bthlabs.pl>
|
||||||
Type: util/sys
|
Type: util/sys
|
||||||
Version: 1.0.0
|
Version: 1.1.0
|
||||||
Architecture: m68k-amigaos
|
Architecture: m68k-amigaos
|
||||||
Requires: AmigaOS 3.1+, MC68020+
|
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
|
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.
|
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
|
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.
|
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:
|
Example:
|
||||||
|
|
||||||
> SniffEmu EMU68
|
> SniffEmu EMU68
|
||||||
|
@ -25,8 +28,8 @@ SniffEmu: Looking for board: 28019:-1... NOT FOUND
|
||||||
> SniffEmu RTG UAE
|
> SniffEmu RTG UAE
|
||||||
SniffEmu: Looking for board: 2011:96... FOUND
|
SniffEmu: Looking for board: 2011:96... FOUND
|
||||||
|
|
||||||
If the emulator (or RTG) was detected, the program will set the returncode to
|
If the emulator (or RTG/SND) was detected, the program will set the returncode
|
||||||
WARN. Otherwise, it'll be OK.
|
to WARN. Otherwise, it'll be OK.
|
||||||
|
|
||||||
Example script:
|
Example script:
|
||||||
|
|
||||||
|
@ -47,6 +50,11 @@ SniffEmu is licensed under the MIT License.
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Version 1.1.0 (25.02.2023)
|
||||||
|
|
||||||
|
* Added sound card detection.
|
||||||
|
|
||||||
Version 1.0.0 (16.02.2023)
|
Version 1.0.0 (16.02.2023)
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user