pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h
wiz 4230c4089e ucon64: update to 2.2.0.
With much help from upstream to get this compiling nicely on NetBSD.

2.2.0
- added (GB) --gp2bmp convert Game Boy Printer data (produced by --xmccl) to
BMP (by dbjh; based on version of gblnk (by Chris McCormick) improved by
Difegue. Many thanks to Difegue for providing me with Game Boy Printer data.
Thanks to Martin Eyre for documenting his findings about Game Boy Printer
commands)
- added (SNES) --sminis=ID convert *.srm (SRAM) file to SNES/Super Famicom
Classic Mini (hakchi2) format for game with identifier ID (by dbjh)
- added (SNES) --smini2srm convert SNES/Super Famicom Classic Mini (hakchi2)
SRAM data to *.srm (SRAM) file (by dbjh)
- added support for NetBSD (by dbjh; thanks to Thomas Klausner for his help)
- updated support for OpenBSD (64-bit) (by dbjh)
- updated (all) made -o also work for --rrom, --r83 and --rjoliet, just like
the other rename options (--rdat, --rl and --ru) (by dbjh)
- updated (SNES) improved reliability of GDSF communication for PCs with a
parallel port that supports ECP (built-in or PCIe parallel port card). At last.
It is essential to correctly specify ecr_offset for this to work (by dbjh; many
thanks to Mystic_Merlin for testing)
- updated (SNES) improved --ufosd by adding specific support for 10 and 12 Mbit
HiROMs and implementing a generic way to set the SRAM mapping bytes (by dbjh;
thanks to Revenant for the information and Trenton_net for testing)
- added (SNES) --xufosd send ROM to Super UFO Pro 8 SD. Be sure to use a tool
like Zadig to add libusb-0.1 (libusb-win32) support (by dbjh; thanks to
Revenant for the information and Trenton_net and Revenant for testing)
- updated (SNES) added NTSC/PAL fix for Soul Blazer F/G and Super Metroid E (by
dbjh; thanks to Mystic_Merlin)
- added (SNES) work-around for using the Game Doctor SF6 protocol for parallel
ports that do not support reading from the Control register. It is good enough
to at least allow dumping saver data and SRAM. To enable the new functionality
assign a value other than 0 to the variable gd6_send_byte_delay. See the FAQ
question 55 for details (by dbjh; many thanks to NorQue and Mystic_Merlin for
testing)
- updated (SNES) made --gd3 specify a pass-through mapping for LoROM DSP games
(by dbjh)
- updated (SNES) added proper recognition of Pro Fighter headers of LoROM DSP
games with 2, 8 or 32 kB SRAM (by dbjh)
- updated (SNES) added interpretation of remaining part of GD3 header (DRAM and
SRAM mapping) to --dbuh (by dbjh)
- updated (SNES & Genesis) fixed split file detection for formats other than
(M)GD and MGH which I broke in 2.1.0 (by dbjh)
- added (all) --split=N split ROM in parts of N Bytes (including possible
header). This is a generic file splitting option. Use -s, optionally in
combination with --ssize=SIZE to split files for use with a specific console or
backup unit (by dbjh)
- added (SNES) support for Super Magicom/SMC IC2 file format. This format is
used by several ancient backup units, including the Twin Supercom, Future
Supercom Pro.9 and UFO Super Drive PRO 6 HYPER VERSION in order to run HiROM
games up to 16 Mbit. Use --ic2 to convert a file to Super Magicom/SMC IC2
format (by dbjh; thanks to Mystic_Merlin for info and testing)
- updated (SNES) fixed bug in --ufo that caused it to produce incorrect headers
for games that do not use SRAM (by dbjh; thanks to Mystic_Merlin for feedback
and testing)
- updated (SNES) fixed bug in -j for files in UFO format smaller than or equal
to 8 Mbit (by dbjh)
2019-07-07 22:47:57 +00:00

77 lines
3 KiB
C

$NetBSD: patch-backup_libcd64_cd64io.h,v 1.2 2019/07/07 22:47:57 wiz Exp $
Patch from upstream to improve build on NetBSD.
--- backup/libcd64/cd64io.h.orig 2018-03-07 11:09:59.000000000 +0000
+++ backup/libcd64/cd64io.h
@@ -30,32 +30,15 @@ int cd64_xfer_portdev(struct cd64_t *cd6
#endif
#ifdef CD64_USE_RAWIO
-/* #define REALLY_SLOW_IO */
-#if defined __linux__ && (defined __i386__ || defined __x86_64__)
+#ifdef __linux__
#include <sys/io.h>
#endif
-#if (defined __OpenBSD__ || defined __NetBSD__) && (defined __i386__ || defined __x86_64__)
+#if defined __OpenBSD__ || defined __NetBSD__
#include <sys/types.h>
#include <machine/sysarch.h>
-#include <machine/pio.h>
-/* pio.h defines several I/O functions & macros, including the macros inb() and
- * outb(). This shows that using a bit of inline assembly is not such a bad idea
- * at all. */
-#undef inb
-#define inb(port) __inb(port)
-#undef outb
-#define outb(data, port) __outb(port, data)
#endif
#ifdef __FreeBSD__
#include <fcntl.h>
-#include <machine/cpufunc.h>
-/* Almost the same story as under OpenBSD. cpufunc.h defines the macros inb()
- * and outb(). We redefine them. Be sure _POSIX_SOURCE is not defined before
- * including <machine/cpufunc.h>. */
-#undef inb
-#define inb(port) inbv(port)
-#undef outb
-#define outb(data, port) outbv(port, data)
#endif
#ifdef __BEOS__
#include <fcntl.h>
@@ -68,24 +51,6 @@ int cd64_xfer_portdev(struct cd64_t *cd6
#pragma warning(pop)
#define F_OK 0
#endif
-#ifdef __MSDOS__
-#include <pc.h> /* inportb() & outportb() */
-#define inb(port) inportb(port)
-#define outb(data, port) outportb(port, data)
-#endif
-#if defined _WIN32 || defined __CYGWIN__
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4255) /* 'function' : no function prototype given: converting '()' to '(void)' */
-#pragma warning(disable: 4668) /* 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' */
-#pragma warning(disable: 4820) /* 'bytes' bytes padding added after construct 'member_name' */
-#endif
-#include <windows.h> /* defines _WIN32 (checks for */
-#ifdef _MSC_VER /* __CYGWIN__ must come first) */
-#pragma warning(pop)
-#endif
-#endif /* _WIN32 || __CYGWIN__ */
-
int cd64_open_rawio(struct cd64_t *cd64);
int cd64_close_rawio(struct cd64_t *cd64);
int cd64_xfer_rawio(struct cd64_t *cd64, uint8_t *wr, uint8_t *rd, int delayms);
@@ -99,8 +64,8 @@ int cd64_xfer_rawio(struct cd64_t *cd64,
#pragma warning(disable: 4668) /* 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' */
#pragma warning(disable: 4820) /* 'bytes' bytes padding added after construct 'member_name' */
#endif
-#include <windows.h>
-#ifdef _MSC_VER
+#include <windows.h> /* defines _WIN32 (checks for */
+#ifdef _MSC_VER /* __CYGWIN__ must come first) */
#pragma warning(pop)
#endif
#define MSLEEP(x) Sleep(x)