VICE emulator v1.11 now compiles with MIPSPro

IRIX and IRIX software discussion including open source and commerical offerings.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
dexter1
Moderator
Moderator
Posts: 2540
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

VICE emulator v1.11 now compiles with MIPSPro

Unread postby dexter1 » Tue Jun 03, 2003 12:11 pm

Hi all,

I've just completed the patch and subsequent build tests of VICE 1.11 (http://viceteam.bei.t-online.de/). It seems to work fine, except for sound, which i don't know if it was broken in the first place.

Do the following if you want to compile it yourself with MIPSPro 7.3x
First, download and unpack the source at:

ftp://ftp.funet.fi/pub/cbm/crossplatfor ... .11.tar.gz

To apply the patch to the source listed below, save it to /tmp/vicesgi.patch and do:

Code: Select all

cd vice-1.11
patch -p0 < /tmp/vicesgi.patch


Then do:

Code: Select all

setenv CC cc
setenv CXX CC
setenv CFLAGS '-I/usr/freeware/include -L/usr/freeware/lib32 -mips4 -Ofast -IPA -ansi -pedantic -D_POSIX_SOURCE -D_BSD_SOURCE -D__EXTENSIONS__ -D_BSD_TYPES'
setenv LDFLAGS -IPA
./configure
gmake


...and cross your fingers. After that a

Code: Select all

gmake install
as root should install everything.

People who are not blessed with MIPSPro 7.3x can use 7.2.1, provided they remove -Ofast -IPA from the CFLAGS and delete LDFLAGS alltogether

So here comes the patch. It is mothafoqqing uglee, probably breaks other (linux?) builds, makes your Indy explode and empties your fridge. In that order. And oh yeah, it needs more work...

Code: Select all

--- src/arch/unix/readline/complete.c.org   Sun Oct  7 23:05:39 2001
+++ src/arch/unix/readline/complete.c   Mon Jun  2 09:42:09 2003
@@ -78,7 +78,7 @@
             *avp = av = new;
         }
 
-        if ((av[ac] = strdup(p)) == NULL) {
+        if ((av[ac] = (char *)strdup(p)) == NULL) {
             if (ac == 0)
                 DISPOSE(av);
             break;
@@ -107,18 +107,18 @@
     char        *fpart;
 
     if ((fpart = strrchr(path, '/')) == NULL) {
-        if ((dpart = strdup(DOT)) == NULL)
+        if ((dpart = (char *)strdup(DOT)) == NULL)
             return -1;
-        if ((fpart = strdup(path)) == NULL) {
+        if ((fpart = (char *)strdup(path)) == NULL) {
             DISPOSE(dpart);
             return -1;
         }
     }
     else {
-        if ((dpart = strdup(path)) == NULL)
+        if ((dpart = (char *)strdup(path)) == NULL)
             return -1;
         dpart[fpart - path] = '\0';
-        if ((fpart = strdup(++fpart)) == NULL) {
+        if ((fpart = (char *)strdup(++fpart)) == NULL) {
             DISPOSE(dpart);
             return -1;
         }
   
--- src/plus4/ted.c.org   Thu Jan 16 20:23:37 2003
+++ src/plus4/ted.c   Tue Jun  3 13:46:21 2003
@@ -134,7 +134,7 @@
     old_maincpu_clk += num;
 }
 
-inline void ted_delay_clk(void)
+void ted_delay_clk(void)
 {
     CLOCK diff;
 
@@ -150,7 +150,7 @@
     return;
 }
 
-inline void ted_handle_pending_alarms(int num_write_cycles)
+void ted_handle_pending_alarms(int num_write_cycles)
 {
     ted_delay_clk();
 
--- src/plus4/ted-fetch.c.org   Sat Oct 12 18:45:02 2002
+++ src/plus4/ted-fetch.c   Tue Jun  3 13:45:45 2003
@@ -39,7 +39,7 @@
 
 /* Emulate a matrix line fetch, `num' bytes starting from `offs'.  This takes
    care of the 10-bit counter wraparound.  */
-inline void ted_fetch_matrix(int offs, int num)
+void ted_fetch_matrix(int offs, int num)
 {
     BYTE *p;
     int start_char;
@@ -60,7 +60,7 @@
     memcpy(ted.cbuf, ted.cbuf_tmp, TED_SCREEN_TEXTCOLS);
 }
 
-inline void ted_fetch_color(int offs, int num)
+void ted_fetch_color(int offs, int num)
 {
     int start_char;
     int c;
     
--- src/drive/drivecpu.c.org   Sat Jan 18 17:31:29 2003
+++ src/drive/drivecpu.c   Tue Jun  3 13:20:06 2003
@@ -322,7 +322,7 @@
     drive_cpu_reset(drv);
 }
 
-inline void drive_cpu_wake_up(drive_context_t *drv)
+void drive_cpu_wake_up(drive_context_t *drv)
 {
     /* FIXME: this value could break some programs, or be way too high for
        others.  Maybe we should put it into a user-definable resource.  */
@@ -333,7 +333,7 @@
     }
 }
 
-inline void drive_cpu_sleep(drive_context_t *drv)
+void drive_cpu_sleep(drive_context_t *drv)
 {
     /* Currently does nothing.  But we might need this hook some day.  */
 }
 
--- src/drive/drive.c.org   Mon Jan 20 19:44:22 2003
+++ src/drive/drive.c   Tue Jun  3 13:53:44 2003
@@ -527,7 +527,7 @@
    The return value corresponds to bit#7 of VIA2 PRB. This means 0x0
    is returned when sync is found and 0x80 is returned when no sync
    is found.  */
-inline BYTE drive_sync_found(drive_t *dptr)
+BYTE drive_sync_found(drive_t *dptr)
 {
     BYTE val = dptr->GCR_track_start_ptr[dptr->GCR_head_offset];
 
@@ -685,7 +685,7 @@
 }
 
 /* Return the write protect sense status. */
-inline BYTE drive_write_protect_sense(drive_t *dptr)
+BYTE drive_write_protect_sense(drive_t *dptr)
 {
     /* Set the write protection bit for the time the disk is pulled out on
        detach.  */
   
--- src/vicii/vicii-irq.c.org   Sat Jan 11 17:44:55 2003
+++ src/vicii/vicii-irq.c   Mon Jun  2 16:27:42 2003
@@ -35,7 +35,7 @@
 #include "viciitypes.h"
 
 
-inline void vicii_irq_set_line(void)
+void vicii_irq_set_line(void)
 {
     if (vic_ii.irq_status & vic_ii.regs[0x1a]) {
         vic_ii.irq_status |= 0x80;
   
--- src/vicii/vicii.c.org   Thu Jan 16 19:54:47 2003
+++ src/vicii/vicii.c   Mon Jun  2 16:33:04 2003
@@ -172,7 +172,7 @@
     old_maincpu_clk += num;
 }
 
-inline void vicii_delay_clk(void)
+void vicii_delay_clk(void)
 {
 #if 0
     CLOCK diff;
@@ -190,7 +190,7 @@
 #endif
 }
 
-inline void vicii_handle_pending_alarms(int num_write_cycles)
+void vicii_handle_pending_alarms(int num_write_cycles)
 {
     if (vic_ii.viciie != 0)
         vicii_delay_clk();
   
--- src/vicii/vicii-fetch.c.org     Tue Jun  3 16:32:01 2003
+++ src/vicii/vicii-fetch.c       Mon Jun  2 16:33:48 2003
@@ -44,7 +44,7 @@
 
 /* Emulate a matrix line fetch, `num' bytes starting from `offs'.  This takes
    care of the 10-bit counter wraparound.  */
-inline void vicii_fetch_matrix(int offs, int num, int num_0xff)
+void vicii_fetch_matrix(int offs, int num, int num_0xff)
 {
     int start_char;
     int c;

--- src/monitor/mon_parse.y.org   Sat Dec 28 21:17:52 2002
+++ src/monitor/mon_parse.y   Mon Jun  2 09:33:59 2003
@@ -38,7 +38,7 @@
 #else  /* Not HAVE_ALLOCA_H.  */
 #if !defined(_AIX) && !defined(WINCE)
 #ifndef _MSC_VER
-extern char *alloca();
+/* extern char *alloca(); */
 #else
 #define alloca(n)   _alloca(n)
 #endif  /* MSVC */
 

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8139
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: VICE emulator v1.11 now compiles with MIPSPro

Unread postby nekonoko » Tue Jun 03, 2003 12:18 pm

Great work! I'll build/package it up tonight :)
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
lisp
Posts: 274
Joined: Wed Feb 05, 2003 5:23 am
Location: England
Contact:

Unread postby lisp » Wed Jun 04, 2003 12:07 am

Right, well, I can't get that patch to work. It bombs out with

patch: **** malformed patch at line 40: }


Anyway, the sound problem, in all liklihood, is because it's linking with ESD. My experience with VICE is that linking with ESD totally messes up sound support, and just about the only way to stop it is to rename everything relating to esd so the configure script can't find it.

I'm also wondering about the speed issue.

In my compilations of VICE-1.11 under GCC, the resultant emulation was *far* slower than VICE-1.10 once the emulator was actually doing something.

Personally, I'd suggest downloading demos from http://demodungeon.c64.org/

The ones by Smash Designs are particularly good stress tests.
--
lisa

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8139
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Unread postby nekonoko » Wed Jun 04, 2003 12:49 am

I'm building it right now; I had ESD in there the first time around so I'm redoing it.
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
dexter1
Moderator
Moderator
Posts: 2540
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Unread postby dexter1 » Wed Jun 04, 2003 12:53 am

Lisp suggests that a setenv CXXFLAGS '-mips4 -Ofast' should also be applied to speed up execution.

Oh and for all the folks who had a hard time extracting the patch from the forum message, i've put it here: http://www.ff-net.demon.nl/papa/vicesgi.patch

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8139
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Unread postby nekonoko » Wed Jun 04, 2003 1:01 am

Okay, here I go again :D
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8139
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Unread postby nekonoko » Wed Jun 04, 2003 1:53 am

Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
cvisors
Moderator
Moderator
Posts: 179
Joined: Fri Jan 31, 2003 2:50 am
Location: Melbourne Australia
Contact:

Thanks Heaps for this

Unread postby cvisors » Wed Jun 04, 2003 3:40 am

This is one thing I have been wanting for my SGI boxes, woo!


Benjamin


Return to “IRIX and Software”

Who is online

Users browsing this forum: No registered users and 1 guest