pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/arnold



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Mon Apr  9 15:03:22 UTC 2018

Modified Files:
        pkgsrc/emulators/arnold: Makefile PLIST distinfo
        pkgsrc/emulators/arnold/patches: patch-aa patch-ab
Added Files:
        pkgsrc/emulators/arnold/patches: patch-src_cpc_amsdos.c
            patch-src_cpc_debugger_gdebug.c patch-src_cpc_render5.c
            patch-src_unix_display__sdl.c patch-src_unix_gtkui.c
Removed Files:
        pkgsrc/emulators/arnold/patches: patch-ac

Log Message:
Update to 20040111

Changelog:
11-Janunary-2004
================
A source patch so you can build Unix/Linux version.

4th-Jan-2004
============

General:
- new: now using CVS source control system. This is making development much much easier! :)

Core:
- fix: fixed I/O port decoding for RAM configuration PAL inside CPC6128; and for PAL integrated
  into CPC+ ASIC. Thankyou to Richard Wilson for his help.
- fix: fixed a bug in the RAM configuration which prevented Overflow's Backtro and C/PM+ from running.
- fix: sample loading: 16-bit samples were treated as unsigned, but they are
  actually signed. fixed.
- fix: lots of fdc emulation bugs fixed
- fix: lots of bugs fixed in disc image output code; applies to inserting unformatted discs;
  a lot of created images were bad!
  strange formats are mostly supported now.
- fix: write deleted data now marks sectors with deleted data control mark now!
- fix: all fdc commands supported including scan commands
- fix: multi-track function of fdc fully implemented
- new: support for DIF disk image (used by CPC++ emulator) [Richard Bannister]
- new: seperated floppy disc controller, floppy disc drive, and floppy disc interface code.
- fix: fixed decoding of disc controller I/O ports
- new: removed as many references to Host_LoadFile and Host_SaveFile from the core code.
(this allows the host to supply binary data which is included in executable, and allows
the host to use it's own load/save functions).
- new: updated the load and save functions to return status code's which indicate an errors
(this allows the host code to return more meaningful error code's and messages;
or to even log them to a file)
- new: removed reference to Host_OpenFile and Host_CloseFile functions from printer code.
The host must now handle the printer output itself.
- new: removed cpcdefs.h file. Defines are build related and should be defined in the project/makefile for each port.
- new: auto-type helper feature; enter the text you want to type in and let the auto-type
feature do all the hard work for you :) Thankyou to Troels K for the first version which
he has in CPC Explorer/CPC Loader.
- new: auto-start helper feature; this feature will attempt to auto-start any image that
has been inserted. But, on the CPC there can be more than one way to run a program,
so this feature may not work with all discs. Try it and see :)

General interface functions:
- merged tape-image and sample handling code

CPC:
- fix: fixed keyboard problems in CPC mode.

CPC+:
- fix: fixed mirror of sprite X,Y coordinates in magnification registers
- fix: fixed sprite coordinates bugs. Simply the Best and Iron demo 3 will display exactly
  as on a real CPC+.

Windows version

Lots of user interface stuff to make Arnold easier to use :)
- new: roms moved to source distribution. Rom data is now built into executable.
- new: roms are integrated into executable. [Troels K, Andreas M, Richard B, Kev T]
- new: command-line supported; you can run arnold from the command line with various parameters.
- new: you can double click on a file to automatically launch Arnold (you must register the file
types first)
- new: you can drag and drop a file onto the Arnold window/exe and it will
  automatically be inserted
- new: you can double click on a file while Arnold is open, and it will be opened in Arnold.
- new: will detect if another instance of the application is running; you can choose to open
file with existing instance or new instance
- new: now using Zlib libary for decompression of ZIP archives. (some old files compressed with PKZIP may
not open; this is a limitation of the Zlib library) [Troels K, Kev T]
- new: executable compressed using UPX [Troels K]
- new: implemented file selection dialog for ZIP archives.
- new: zip archives now supported by all media (cassette, disc, cartridge, snapshot etc)
- fix: rom versions were not always displayed. Now fixed.
- new: lots of changes for UNICODE version of Arnold. [Troels K]
- new: unicode support for zlib [Troels K]
- new: build instructions for windows version
- new: About dialog box giving some copyright, logo and version information
- new: manifest file used to enable new look under Windows XP.
- new: you can associate the files of your choice with Arnold. Or if you want to keep your
current associations, then you can open the files using "Open with Arnold" from the shell.
- new: merged "Open Sample" and "Open Tape Image" into a single "Open Tape" menu item.
- new: "recent files" menu
- inserting a unformatted disc and selecting a existing file will now ask if you want
  to overwrite.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/emulators/arnold/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/emulators/arnold/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/emulators/arnold/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/emulators/arnold/patches/patch-aa \
    pkgsrc/emulators/arnold/patches/patch-ab
cvs rdiff -u -r1.1 -r0 pkgsrc/emulators/arnold/patches/patch-ac
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/arnold/patches/patch-src_cpc_amsdos.c \
    pkgsrc/emulators/arnold/patches/patch-src_cpc_debugger_gdebug.c \
    pkgsrc/emulators/arnold/patches/patch-src_cpc_render5.c \
    pkgsrc/emulators/arnold/patches/patch-src_unix_display__sdl.c \
    pkgsrc/emulators/arnold/patches/patch-src_unix_gtkui.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/arnold/Makefile
diff -u pkgsrc/emulators/arnold/Makefile:1.26 pkgsrc/emulators/arnold/Makefile:1.27
--- pkgsrc/emulators/arnold/Makefile:1.26       Sat Apr 25 14:20:44 2015
+++ pkgsrc/emulators/arnold/Makefile    Mon Apr  9 15:03:22 2018
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.26 2015/04/25 14:20:44 tnn Exp $
+# $NetBSD: Makefile,v 1.27 2018/04/09 15:03:22 ryoon Exp $
 #
 
-DISTNAME=              arnsrc27012002
-PKGNAME=               arnold-20020127
-PKGREVISION=           7
+DISTNAME=              arnsrc04012004
+PKGNAME=               arnold-20040111
 CATEGORIES=            emulators
 MASTER_SITES=          http://arnold.emuunlim.com/download/
 EXTRACT_SUFX=          .zip
@@ -23,11 +22,14 @@ SHAREDIR=           ${PREFIX}/share/arnold
 MAKE_ENV+=             SHAREDIR=${SHAREDIR}
 AUTO_MKDIRS=           yes
 
-USE_TOOLS+=            pax
+USE_TOOLS+=            gmake pax
+
+post-extract:
+       cd ${WRKSRC} && ${FIND} . -type d -name CVS -print | ${XARGS} ${RM} -rf
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/arnold ${DESTDIR}${PREFIX}/bin
-       cd ${WRKSRC}/roms && pax -wr * ${DESTDIR}${SHAREDIR}/roms/
+       cd ${WRKSRC}/src/roms && pax -wr * ${DESTDIR}${SHAREDIR}/roms/
        cd ${DESTDIR}${SHAREDIR}/roms && \
                ${FIND} . -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE} && \
                ${FIND} . -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}

Index: pkgsrc/emulators/arnold/PLIST
diff -u pkgsrc/emulators/arnold/PLIST:1.3 pkgsrc/emulators/arnold/PLIST:1.4
--- pkgsrc/emulators/arnold/PLIST:1.3   Mon Jan  1 22:29:26 2018
+++ pkgsrc/emulators/arnold/PLIST       Mon Apr  9 15:03:22 2018
@@ -1,19 +1,17 @@
-@comment $NetBSD: PLIST,v 1.3 2018/01/01 22:29:26 rillig Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/04/09 15:03:22 ryoon Exp $
 bin/arnold
+share/arnold/roms/ARNOR/PROTEXT.ROM
+share/arnold/roms/ARNOR/UTOPIA.ROM
 share/arnold/roms/amsdose/amsdos.rom
-share/arnold/roms/amsdose/file_id.diz
 share/arnold/roms/cpc464e/basic.rom
-share/arnold/roms/cpc464e/file_id.diz
 share/arnold/roms/cpc464e/os.rom
 share/arnold/roms/cpc6128e/basic.rom
-share/arnold/roms/cpc6128e/file_id.diz
 share/arnold/roms/cpc6128e/os.rom
 share/arnold/roms/cpc664e/basic.rom
-share/arnold/roms/cpc664e/file_id.diz
 share/arnold/roms/cpc664e/os.rom
-share/arnold/roms/cpcplus/out.tmp
 share/arnold/roms/cpcplus/system.cpr
 share/arnold/roms/kcc/kccbas.rom
 share/arnold/roms/kcc/kccos.rom
+share/arnold/roms/parados.rom
 share/doc/arnold/readme.linux
 share/doc/arnold/readme.txt

Index: pkgsrc/emulators/arnold/distinfo
diff -u pkgsrc/emulators/arnold/distinfo:1.5 pkgsrc/emulators/arnold/distinfo:1.6
--- pkgsrc/emulators/arnold/distinfo:1.5        Tue Nov  3 20:30:55 2015
+++ pkgsrc/emulators/arnold/distinfo    Mon Apr  9 15:03:22 2018
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.5 2015/11/03 20:30:55 agc Exp $
+$NetBSD: distinfo,v 1.6 2018/04/09 15:03:22 ryoon Exp $
 
-SHA1 (arnsrc27012002.zip) = de3102b954d79176dce259375dc1824189027f8e
-RMD160 (arnsrc27012002.zip) = 7b43c157cbc4f6171ee9ef14cc282cc1692188c6
-SHA512 (arnsrc27012002.zip) = 035a8c935d221634f2ec9fb341291aa733dbf224d66a84e337928e77d0ff27de4875529b019d2600d87dfeeac998f2772d3ff6e0222d29fd9766540c595b28ec
-Size (arnsrc27012002.zip) = 916680 bytes
-SHA1 (patch-aa) = aff649f6c37cf7a321c182442d9faac44594b413
-SHA1 (patch-ab) = fde2730f3cf53d539543489a6d691ad7a6bc9d68
-SHA1 (patch-ac) = 0f7681cbf3f6345ce7427591936c607075fa76ac
+SHA1 (arnsrc04012004.zip) = 7020aa50d80f55cd10bf280fc3a8fdc0ef44e7c3
+RMD160 (arnsrc04012004.zip) = 9e9cce2b1a869769af10f951b1bdc0ca5d3b6461
+SHA512 (arnsrc04012004.zip) = a9503325cd7972294b80e715c3ff270544b210403acb5b9d69e56eec7aa4a4d10a54bfe0ad353bd5715c7213cd68212636d06520147b25abc9e38cce50ead02b
+Size (arnsrc04012004.zip) = 1082107 bytes
+SHA1 (patch-aa) = 7e576715cd16cbeaed1b87d51b2bc04d291716e2
+SHA1 (patch-ab) = 89d03d691f93aa5e48072c2d93579a1ddbe148ec
+SHA1 (patch-src_cpc_amsdos.c) = 9edeca19e486c24826222e5bb0950ba8a90d10d8
+SHA1 (patch-src_cpc_debugger_gdebug.c) = 3303e9779b9a7dc95fc02d07e339ecacaef476d7
+SHA1 (patch-src_cpc_render5.c) = 8c9150e424caed46079869576adbbc5645f1c855
+SHA1 (patch-src_unix_display__sdl.c) = b43d5f61cffee6f16d61d65b7a56f68390f612b9
+SHA1 (patch-src_unix_gtkui.c) = 847c4809707873a7b7769891866ae332e121f071

Index: pkgsrc/emulators/arnold/patches/patch-aa
diff -u pkgsrc/emulators/arnold/patches/patch-aa:1.2 pkgsrc/emulators/arnold/patches/patch-aa:1.3
--- pkgsrc/emulators/arnold/patches/patch-aa:1.2        Thu Nov  3 21:40:13 2005
+++ pkgsrc/emulators/arnold/patches/patch-aa    Mon Apr  9 15:03:22 2018
@@ -1,46 +1,34 @@
-$NetBSD: patch-aa,v 1.2 2005/11/03 21:40:13 rillig Exp $
+$NetBSD: patch-aa,v 1.3 2018/04/09 15:03:22 ryoon Exp $
 
---- src/Makefile.in.orig       Sat Jan 19 15:49:14 2002
+--- src/Makefile.in.orig       2004-01-04 05:18:40.000000000 +0000
 +++ src/Makefile.in
 @@ -25,7 +25,7 @@ SDLINC = @SDL_CFLAGS@
  SDLLIB = @SDL_LIBS@
  
  #-Wall for max warnings!
 -CFLAGS = @CPPFLAGS@ @CFLAGS@ $(GTKINC) $(SDLINC) @DEFS@ $(X11INC) -I. -DUNIX -Wall -Wno-unused
-+CFLAGS = @CPPFLAGS@ @CFLAGS@ $(GTKINC) $(SDLINC) @DEFS@ $(X11INC) -I. -DUNIX -Wall -Wno-unused -DSHAREDIR=\"${SHAREDIR}\"
++CFLAGS = @CPPFLAGS@ @CFLAGS@ $(GTKINC) $(SDLINC) @DEFS@ $(X11INC) -I. -DUNIX -DCPC_LSB_FIRST -Wall -Wno-unused
  #-g3 -pg -dm -dp -a
  LFLAGS1 = @LDFLAGS@ @LIBS@ $(GTKLIB) $(SDLLIB) $(X11LIBS)
  #debug
-@@ -55,9 +55,30 @@ IFACEGEN_O= ifacegen/ifacegen.o ifacegen
- UNIX_O= unix/main.o unix/host.o unix/global.o unix/settings.o \
-       unix/display.o unix/display_sdl.o unix/gtkui.o unix/sdlsound.o
+@@ -39,17 +39,17 @@ TARGET_CPU = @target_cpu@
+ CPC_O=        cpc/arnold.o cpc/asic.o cpc/audioevent.o cpc/bmp.o cpc/cpc.o \
+       cpc/crtc.o cpc/dumpym.o cpc/fdc.o cpc/fdd.o cpc/fdi.o \
+       cpc/garray.o cpc/multface.o cpc/printer.o cpc/psgplay.o \
+-      cpc/psg.o cpc/render.o cpc/render5.o cpc/scrsnap.o \
++      cpc/psg.o cpc/render.o cpc/render5.o \
+       cpc/snapshot.o cpc/sampload.o cpc/spo256.o cpc/pal.o \
+       cpc/voc.o cpc/tzxold.o cpc/wav.o cpc/westpha.o cpc/yiq.o \
+       cpc/z8536.o cpc/csw.o cpc/cassette.o cpc/amsdos.o \
+       cpc/debugger/gdebug.o cpc/debugger/breakpt.o \
+       cpc/diskimage/diskimg.o cpc/ramrom.o \
+       cpc/diskimage/dsk.o cpc/diskimage/extdsk.o \
+-      cpc/diskimage/iextdsk.o cpc/diskimage/maketrk.o \
++      cpc/diskimage/iextdsk.o \
+       cpc/z80/z80.o cpc/debugger/memdump.o \
+       cpc/riff.o cpc/snapv3.o \
+-      cpc/cheatsys.o cpc/cpcdbg.o cpc/messages.o
++      cpc/messages.o
  
-+CPC_O2=       arnold.o asic.o audioevent.o bmp.o cpc.o \
-+      crtc.o debugmain.o dirstuff.o dumpym.o fdc.o \
-+      garray.o multface.o printer.o psgplay.o \
-+      psg.o render.o render5.o scrsnap.o \
-+      snapshot.o sampload.o spo256.o \
-+      voc.o tzx.o wav.o westpha.o yiq.o \
-+      debug.o z8536.o \
-+      gdebug.o breakpt.o \
-+      diskimg.o \
-+      dsk.o extdsk.o \
-+      iextdsk.o maketrk.o \
-+      z80.o memdump.o \
-+      riff.o snapv3.o expbuf.o \
-+      cheatsys.o cpcdbg.o
-+ 
-+IFACEGEN_O2= ifacegen.o fnp.o romfn.o \
-+      filetool.o
-+ 
-+UNIX_O2= main.o host.o global.o settings.o \
-+      display.o display_sdl.o gtkui.o sdlsound.o
-+ 
- arnold:  $(CPC_O) $(IFACEGEN_O) $(UNIX_O)
--      $(BIND) -o arnold $(LFLAGS1) $(CPC_O) $(IFACEGEN_O)     \
--      $(UNIX_O) $(LFLAGS2) 
-+      $(BIND) -o arnold $(LFLAGS1) $(CPC_O2) $(IFACEGEN_O2)   \
-+      $(UNIX_O2) $(LFLAGS2) 
-       mv arnold ..
- ctags:
-       ctags -R
+ UNIX_O= unix/main.o unix/host.o unix/global.o \
+       unix/display.o unix/display_sdl.o unix/gtkui.o unix/sdlsound.o \
Index: pkgsrc/emulators/arnold/patches/patch-ab
diff -u pkgsrc/emulators/arnold/patches/patch-ab:1.2 pkgsrc/emulators/arnold/patches/patch-ab:1.3
--- pkgsrc/emulators/arnold/patches/patch-ab:1.2        Thu Nov  3 21:40:13 2005
+++ pkgsrc/emulators/arnold/patches/patch-ab    Mon Apr  9 15:03:22 2018
@@ -1,22 +1,49 @@
-$NetBSD: patch-ab,v 1.2 2005/11/03 21:40:13 rillig Exp $
+$NetBSD: patch-ab,v 1.3 2018/04/09 15:03:22 ryoon Exp $
 
---- src/unix/main.c.orig       Sun Nov  4 21:15:22 2001
+--- src/unix/main.c.orig       2004-01-04 05:10:54.000000000 +0000
 +++ src/unix/main.c
-@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
-               char LocalDirectory[1024];
-               char ProgramDirectory[1024]="";
-               
--              getcwd(ProgramDirectory, 1024);
-+              strcpy(ProgramDirectory, SHAREDIR);
+@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
  
- sprintf(LocalDirectory,"%s/roms/amsdose/",ProgramDirectory);
+       init_main(argc, argv);
        
-@@ -94,8 +94,6 @@ LocalDirectory);     
+-      GenericInterface_Finish();
++//    GenericInterface_Finish();
  
-       if (CPCEmulation_Initialise())
-         {
--              chdir(ProgramDirectory);
--
-               CPC_SetCPCType(CPC_TYPE_CPC6128);
+ //    DirStuff_Finish();
  
-               if (argc!=0)
+@@ -207,7 +207,7 @@ void init_main(int argc, char *argv[]) {
+       do {
+               int this_option_optind = optind ? optind : 1;
+               int option_index = 0;
+-              c = getopt_long_only (argc, argv, "",
++              c = getopt_long (argc, argv, "",
+                       long_options, &option_index);
+               printf("c: %i %c\n", c, c);
+               switch(c) {
+@@ -281,7 +281,7 @@ void init_main(int argc, char *argv[]) {
+       /* fprintf(stderr,"%s\n",LocalDirectory); */
+ 
+ 
+-      GenericInterface_Initialise();
++      //GenericInterface_Initialise();
+ 
+   /* initialise cpc hardware */
+       CPC_Initialise();
+@@ -297,7 +297,7 @@ void init_main(int argc, char *argv[]) {
+               ConfigCPC6128();
+ 
+               if (tape) {
+-                      if (!TapeImage_InsertFromFile(tape)) {
++                      if (!GenericInterface_InsertTape(tape)) {
+                               printf(Messages[73], tape);
+                       }
+               }
+@@ -381,7 +381,7 @@ void init_main(int argc, char *argv[]) {
+               }
+ 
+               if (snapshot) {
+-                      if (!Snapshot_Load(snapshot)) {
++                      if (!GenericInterface_LoadSnapshot(snapshot)) {
+                               printf(Messages[78],
+                                       snapshot);
+                       }

Added files:

Index: pkgsrc/emulators/arnold/patches/patch-src_cpc_amsdos.c
diff -u /dev/null pkgsrc/emulators/arnold/patches/patch-src_cpc_amsdos.c:1.1
--- /dev/null   Mon Apr  9 15:03:22 2018
+++ pkgsrc/emulators/arnold/patches/patch-src_cpc_amsdos.c      Mon Apr  9 15:03:22 2018
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_cpc_amsdos.c,v 1.1 2018/04/09 15:03:22 ryoon Exp $
+
+--- src/cpc/amsdos.c.orig      2004-01-03 23:22:58.000000000 +0000
++++ src/cpc/amsdos.c
+@@ -559,11 +559,11 @@ int AMSDOS_GetPrefixPriority(const char 
+ 
+               /* default prefixes in order searched for by AMSDOS */
+               /* assign higher priority to order prefixes are used */
+-              if (stricmp(pExtension,"   ")==0)
++              if (strcmp(pExtension,"   ")==0)
+                       return 3;
+-              if (stricmp(pExtension,"BAS")==0)
++              if (strcmp(pExtension,"BAS")==0)
+                       return 2;
+-              if (stricmp(pExtension,"BIN")==0)
++              if (strcmp(pExtension,"BIN")==0)
+                       return 1;
+       }
+ 
Index: pkgsrc/emulators/arnold/patches/patch-src_cpc_debugger_gdebug.c
diff -u /dev/null pkgsrc/emulators/arnold/patches/patch-src_cpc_debugger_gdebug.c:1.1
--- /dev/null   Mon Apr  9 15:03:22 2018
+++ pkgsrc/emulators/arnold/patches/patch-src_cpc_debugger_gdebug.c     Mon Apr  9 15:03:22 2018
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_cpc_debugger_gdebug.c,v 1.1 2018/04/09 15:03:22 ryoon Exp $
+
+Fix segfault on quit
+https://github.com/rofl0r/arnold/commit/08915c467477ad2316cd5a8997a3538738be8945
+
+--- src/cpc/debugger/gdebug.c.orig     2004-01-03 01:02:20.000000000 +0000
++++ src/cpc/debugger/gdebug.c
+@@ -2757,7 +2757,7 @@ void    Debug_DeleteComparisonList(DEBUG
+                 pNode = pList->Dummy.pNext;
+ 
+                 /* traverse as long as node isn't the dummy node */
+-                while (pNode!=&pList->Dummy)
++                while (pNode && pNode!=&pList->Dummy)
+                 {
+                         DEBUG_CMP_LIST_NODE *pNext;
+ 
Index: pkgsrc/emulators/arnold/patches/patch-src_cpc_render5.c
diff -u /dev/null pkgsrc/emulators/arnold/patches/patch-src_cpc_render5.c:1.1
--- /dev/null   Mon Apr  9 15:03:22 2018
+++ pkgsrc/emulators/arnold/patches/patch-src_cpc_render5.c     Mon Apr  9 15:03:22 2018
@@ -0,0 +1,90 @@
+$NetBSD: patch-src_cpc_render5.c,v 1.1 2018/04/09 15:03:22 ryoon Exp $
+
+Fix segfault on quit
+https://github.com/rofl0r/arnold/commit/08915c467477ad2316cd5a8997a3538738be8945
+
+--- src/cpc/render5.c.orig     2004-01-02 06:00:40.000000000 +0000
++++ src/cpc/render5.c
+@@ -57,14 +57,16 @@ static int Render_CPCRenderHeight, Rende
+ static int Render_CPCXOffset, Render_CPCYOffset;
+ 
+ 
+-static void   Render_SetColourNULL(RGBCOLOUR *pColour,/*int Red, int Green, int Blue,*/ int Index);
++static void   Render_SetColourNULL(const RGBCOLOUR *pColour,/*int Red, 
++int Green, int Blue,*/ int Index);
+ static void Render_PutDataWordNULL(int, unsigned long, int);
+ static void Render_PutSyncNULL(int, int);
+ static void Render_PutBorderNULL(int, int);
+ static void Render_PutDataWordPLUSNULL(int HorizontalCount,unsigned long GraphicsData, int Line, unsigned long Mask, int *pPixels);
+ 
+ static void (*pRender_DumpScreen)(void) = NULL;
+-static void (*pRender_SetColour)(RGBCOLOUR *pColour,/*int, int, int,*/ int)=Render_SetColourNULL;
++static void (*pRender_SetColour)(const RGBCOLOUR *pColour,/*int, int, 
++int,*/ int)=Render_SetColourNULL;
+ static void (*pRender_PutDataWord)(int, unsigned long, int)=Render_PutDataWordNULL;
+ static void (*pRender_PutSync)(int, int)=Render_PutSyncNULL;
+ static void (*pRender_PutBorder)(int, int)=Render_PutBorderNULL;
+@@ -95,7 +97,8 @@ static PALETTE_ENTRY_RGB888    UnConvert
+ static unsigned long    ConvertedColourTable[32];
+ 
+ /* TrueColour RGB version of set colour */
+-static void Render_TrueColourRGB_SetColour(RGBCOLOUR *pColour, /*int, int, int,*/int);
++static void Render_TrueColourRGB_SetColour(const RGBCOLOUR *pColour, 
++/*int, int, int,*/int);
+ static void Render_TrueColourRGB_Setup(void);
+ 
+ /* **** PALETTE stuff **** */
+@@ -115,7 +118,8 @@ static PALETTE_ENTRY    CPCPalette[256];
+ /* palette we build up */
+ 
+ /* Paletted version of set colour */
+-static void Render_Paletted_SetColour(RGBCOLOUR *pColour, /*int,int,int,*/int);
++static void Render_Paletted_SetColour(const RGBCOLOUR *pColour, 
++/*int,int,int,*/int);
+ static void Render_Paletted_Setup(void);
+ 
+ 
+@@ -211,7 +215,8 @@ static void Render_TrueColourRGB_Setup(v
+ 
+ }
+ 
+-void  Render_TrueColourRGB_SetColour(RGBCOLOUR *pColour,/*int Red, int Green, int Blue,*/ int
++void  Render_TrueColourRGB_SetColour(const RGBCOLOUR *pColour,/*int Red, 
++int Green, int Blue,*/ int
+ Index)
+ {
+       /* convert R,G,B into format of screen pixel */
+@@ -343,7 +348,8 @@ int     GetIndexInPalette(int PenIndex, 
+ }
+ 
+ 
+-static void   Render_Paletted_SetColour(RGBCOLOUR *pColour,/*int Red, int Green, int Blue,*/
++static void   Render_Paletted_SetColour(const RGBCOLOUR *pColour,/*int 
++Red, int Green, int Blue,*/
+ int Index)
+ {
+       int PaletteIndex;
+@@ -473,10 +479,12 @@ void    Render_Finish(void)
+         if (pScreenBase!=NULL)
+         {
+                 free(pScreenBase);
++                pScreenBase = 0;
+         }
+ }
+ 
+-void  Render_SetColourNULL(RGBCOLOUR *pColour,/*int Red, int Green, int Blue,*/ int Index)
++void  Render_SetColourNULL(const RGBCOLOUR *pColour,/*int Red, int 
++Green, int Blue,*/ int Index)
+ {
+ }
+ 
+@@ -499,7 +507,8 @@ static void Render_PutDataWordPLUSNULL(i
+ 
+ 
+ /* set pen index specified by Index to Red, Green and Blue specified */
+-void    Render_SetColour(RGBCOLOUR *pColour,/*int Red,int Green,int Blue,*/ int Index)
++void    Render_SetColour(const RGBCOLOUR *pColour,/*int Red,int Green,int 
++Blue,*/ int Index)
+ {
+       /* store chosen colour - in conversion table */
+       UnConvertedColourTable[Index].RGB.SeperateElements.u.element.Red = pColour->u.element.Red;
Index: pkgsrc/emulators/arnold/patches/patch-src_unix_display__sdl.c
diff -u /dev/null pkgsrc/emulators/arnold/patches/patch-src_unix_display__sdl.c:1.1
--- /dev/null   Mon Apr  9 15:03:22 2018
+++ pkgsrc/emulators/arnold/patches/patch-src_unix_display__sdl.c       Mon Apr  9 15:03:22 2018
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_unix_display__sdl.c,v 1.1 2018/04/09 15:03:22 ryoon Exp $
+
+--- src/unix/display_sdl.c.orig        2003-12-20 09:47:50.000000000 +0000
++++ src/unix/display_sdl.c
+@@ -34,7 +34,7 @@ static INLINE void debug(char *s) {
+       fprintf(stderr,"%s\n",s);
+ }
+ 
+-void sdl_InitialiseKeyboardMapping(void);
++void sdl_InitialiseKeyboardMapping(int);
+ void sdl_InitialiseJoysticks(void);
+ 
+ void sdl_SetDisplay(int Width, int Height, int Depth, BOOL fullscreen) {
Index: pkgsrc/emulators/arnold/patches/patch-src_unix_gtkui.c
diff -u /dev/null pkgsrc/emulators/arnold/patches/patch-src_unix_gtkui.c:1.1
--- /dev/null   Mon Apr  9 15:03:22 2018
+++ pkgsrc/emulators/arnold/patches/patch-src_unix_gtkui.c      Mon Apr  9 15:03:22 2018
@@ -0,0 +1,184 @@
+$NetBSD: patch-src_unix_gtkui.c,v 1.1 2018/04/09 15:03:22 ryoon Exp $
+
+--- src/unix/gtkui.c.orig      2004-01-04 05:09:30.000000000 +0000
++++ src/unix/gtkui.c
+@@ -20,6 +20,17 @@
+ #include <gtk/gtk.h>
+ #include "../cpc/messages.h"
+ 
++void ConfigCPC464();
++void ConfigCPC6128();
++void ConfigCPC664();
++void Config464Plus();
++void Config6128Plus();
++void ConfigKCCompact();
++
++void SaveFile(const char *,const unsigned char *pPtr, unsigned long 
++Length);
++
++
+ GtkWidget *btn_diska, *btn_diskb, *btn_cartridge, *btn_tape, *btn_loadsnap,
+       *btn_savesnap, *btn_reset, *btn_quit, *btn_lock, *btn_double,
+       *btn_audio, *btn_joysticks;
+@@ -33,7 +44,8 @@ static char *CPCTYPESTRINGS[7] = { "CPC 
+       "CPC 6128+", "KC Compact", NULL };
+ static char *CRTCTYPESTRINGS[6] = { "CRTC 0", "CRTC 1", "CRTC 2", "CRTC 3",
+       "CRTC 4", NULL };
+-static char *KEYBOARDTYPESTRINGS[3] = { "QWERTY", "QWERTZ", "AZERTY", NULL };
++static char *KEYBOARDTYPESTRINGS[4] = { "QWERTY", "QWERTZ", "AZERTY", NULL 
++};
+ 
+ static BOOL cpcPaused = FALSE;
+ 
+@@ -92,12 +104,29 @@ void get_filename_and_destroy( char *fil
+ 
+ }
+ 
++void write_disk(int drive)
++{
++      unsigned char *pBuffer;
++      unsigned long Length;
++
++      Length = DiskImage_CalculateOutputSize(drive);
++              
++      pBuffer = malloc(Length);
++      if (pBuffer)
++      {
++              DiskImage_GenerateOutputData(pBuffer, drive);
++              SaveFile("test.dsk",pBuffer,Length);
++
++              free(pBuffer);  
++      }       
++}
++
+ 
+ void save_disk_and_insert( GtkWidget *w, GtkWindow *dialog, int drive,
+       char *filename){
+       gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-      DiskImage_WriteImage(drive);
++      write_disk(drive);
+       DiskImage_RemoveDisk(drive);
+       
+       if (!GenericInterface_InsertDiskImage( drive, filename )) {
+@@ -109,7 +138,7 @@ void dont_save_disk_and_insert( GtkWidge
+       char *filename) {
+       gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-      DiskImage_RemoveDisk(drive);
++      write_disk(drive);
+ 
+       if (!GenericInterface_InsertDiskImage( drive, filename )) {
+               printf("Failed to open disk image %s.\r\n", filename);
+@@ -135,7 +164,7 @@ void dont_save_diskB_and_insert( GtkWidg
+ void save_disk_and_quit( GtkWidget *w, GtkWindow *dialog, int drive) {
+       gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-      DiskImage_WriteImage(drive);
++      write_disk(drive);
+       DiskImage_RemoveDisk(drive);
+ 
+       if (!FDD_IsDiskPresent(0) && !FDD_IsDiskPresent(1)) {
+@@ -146,7 +175,7 @@ void save_disk_and_quit( GtkWidget *w, G
+ void dont_save_disk_and_quit( GtkWidget *w, GtkWindow *dialog, int drive){
+       gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-      DiskImage_RemoveDisk(drive);
++      write_disk(drive);
+ 
+       if (!FDD_IsDiskPresent(0) && !FDD_IsDiskPresent(1)) {
+               gtk_main_quit();
+@@ -237,7 +266,7 @@ void choosen_tape( GtkWidget *w, GtkFile
+       char filename[ PATH_MAX ];
+       get_filename_and_destroy( filename, fs );
+ 
+-      if (!GenericInterface_InsertTapeImage( filename )) {
++      if (!GenericInterface_InsertTape( filename )) {
+               printf(Messages[73], filename);
+       } 
+ 
+@@ -258,15 +287,19 @@ void choosen_savesnap( GtkWidget *w, Gtk
+ 
+       char filename[ PATH_MAX ];
+       int cpcType;
++      int nSize = 64;
+       get_filename_and_destroy( filename, fs );
+ 
+-      cpcType = CPC_GetCPCType();
+-      if (cpcType == CPC_TYPE_CPC6128 || cpcType == CPC_TYPE_6128PLUS) {
+-              GenericInterface_SetSnapshotSize(128);
+-      } else {
+-              GenericInterface_SetSnapshotSize(64);
+-      }
+-      if (!GenericInterface_SnapshotSave( filename )) {
++//    cpcType = CPC_GetHardware();
++//
++//    if (cpcType == CPC_TYPE_CPC6128 || cpcType == CPC_TYPE_6128PLUS) {
++//            nSize = 128;
++//    } else {
++//            nSize = 64;
++//    }
++
++      nSize = 128;
++      if (!GenericInterface_SnapshotSave( filename,3,nSize )) {
+               printf(Messages[90], filename);
+       } 
+       cpcPaused = FALSE;
+@@ -318,7 +351,7 @@ void choose_media( GtkWidget *widget, gp
+ }
+ 
+ void reset( GtkWidget *widget, gpointer data ) {
+-      GenericInterface_DoReset();
++      CPC_Reset();
+ }
+ 
+ static void quit( GtkWidget *widget, gpointer data ) {
+@@ -393,7 +426,47 @@ int indexInArray( char *s, char **p ) {
+ void choose_cpctype( GtkWidget *widget, gpointer data ) {
+       fprintf(stderr, Messages[96], (char *) data,
+               indexInArray((char *) data, CPCTYPESTRINGS));
+-      CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
++
++      switch (indexInArray((char *)data, CPCTYPESTRINGS))
++      {
++              case 0:
++              {
++                      ConfigCPC464();
++              }
++              break;
++
++              case 1:
++              {
++                      ConfigCPC664();
++              }
++              break;
++
++              case 2:
++              {
++                      ConfigCPC6128();
++              }
++              break;
++
++              case 3:
++              {
++                      Config464Plus();
++              }
++              break;
++
++              case 4:
++              {
++                      Config6128Plus();
++              }
++              break;
++
++              case 5:
++              {
++                      ConfigKCCompact();
++              }
++              break;
++      }
++
++//    CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
+ }
+ 
+ void choose_crtctype( GtkWidget *widget, gpointer data ) {



Home | Main Index | Thread Index | Old Index