What Needs to be done for a NeXT Emulator

Started by cjbriare, August 16, 2010, 06:34:34 PM

Previous topic - Next topic

andreas_g

You can send them to me via e-mail. I wrote you a PM with my address. Alternatively you can upload them to Dropbox or something similar.

andreas_g

We were able to fix the problem. It was just misconfigured.

wlewisiii

Just realized I hadn't posted an update and came here to do so. The newer versions must be fussier somewhere in the code because it was an option I hadn't needed preveiously (heh).

Thank you for your help and your patience, Andreas.

wlewisiii

One other question while I'm here bugging people again, has anyone built a version more recent than 2.5 for Windows? I can not get Previous to build on Windows no matter how many dead chickens I wave over that $^@#)#$@ accursed copy of Visual Studio much less cygwin. I prefer using it on my Linux laptop most of the time but it's nice to have a copy of Previous of a USB to use during slow times at work for example and its nice to have the same versions and configurations on all platforms.

Thanks!

andreas_g

Previous comes with a readme file called building.previous.txt. It includes instructions for building on Windows. It was provided by someone who successfully built Previous on Windows. I do not know if it still works but it might be a good starting point.

I recommend to check out branch_softfloat for trying to build on Windows as trunk is missing a file. It will be added to trunk with the next release.

While trying to build please note all deviations from the instructions (if any) and in case of success report them to me. I'll then update the instructions.

wlewisiii

I'll see if I can get that to work. Thank you.

wlewisiii

Using MingW,fresh install:
following the directions in the text file & using the branch_softfloat:
from config:
xattr.h :   not found, no netboot possible

during build:
[61/183] Building C object src/slirp/CMakeFiles/Slirp.dir/bootp.c.obj
FAILED: src/slirp/CMakeFiles/Slirp.dir/bootp.c.obj
D:\msys64\mingw64\bin\cc.exe -DCONFDIR=\".\" -DHAVE_STRERROR -DHAVE_UNISTD_H -DSDL_MAIN_HANDLED -ID:
/msys64/home/wlewis/branch_softfloat/src/includes -ID:/msys64/home/wlewis/branch_softfloat/src/debug
 -ID:/msys64/home/wlewis/branch_softfloat/src/dsp -ID:/msys64/home/wlewis/branch_softfloat/src/softf
loat -ID:/msys64/home/wlewis/branch_softfloat/src/dimension -ID:/msys64/home/wlewis/branch_softfloat
/src/slirp -ID:/msys64/home/wlewis/branch_softfloat/build -ID:/msys64/home/wlewis/branch_softfloat/s
rc/cpu -ID:/msys64/home/wlewis/branch_softfloat/src/slirp/../ditool -isystem D:/msys64/mingw64/inclu
de/SDL2 -std=gnu99 -Wcast-qual -Wbad-function-cast -Wpointer-arith -Wmissing-prototypes -Wstrict-pro
totypes -Wall -Wwrite-strings -Wsign-compare -Wformat-security -g -O0 -D__USE_MINGW_ANSI_STDIO=1 -Wn
o-conversion -Wno-unused -Wno-sign-compare -Wno-missing-field-initializers -Wimplicit-fallthrough=2
-Wshadow=local -Wno-sign-compare -Wno-strict-overflow -O3 -DNDEBUG -MD -MT src/slirp/CMakeFiles/Slir
p.dir/bootp.c.obj -MF src\slirp\CMakeFiles\Slirp.dir\bootp.c.obj.d -o src/slirp/CMakeFiles/Slirp.dir
/bootp.c.obj -c D:/msys64/home/wlewis/branch_softfloat/src/slirp/bootp.c
D:/msys64/home/wlewis/branch_softfloat/src/slirp/bootp.c:46:22: error: '_SC_HOST_NAME_MAX' undeclare
d here (not in a function)
   46 | static char hostname[_SC_HOST_NAME_MAX];
      |                      ^~~~~~~~~~~~~~~~~
D:/msys64/home/wlewis/branch_softfloat/src/slirp/bootp.c: In function 'bootp_reply':
D:/msys64/home/wlewis/branch_softfloat/src/slirp/bootp.c:215:18: warning: declaration of 'val' shado
ws a previous local [-Wshadow=local]
  215 |         uint32_t val;
      |                  ^~~
D:/msys64/home/wlewis/branch_softfloat/src/slirp/bootp.c:129:9: note: shadowed declaration is here
  129 |     int val;
      |         ^~~
[62/183] Building C object src/slirp/CMakeFiles/Slirp.dir/cksum.c.obj
D:/msys64/home/wlewis/branch_softfloat/src/slirp/cksum.c: In function 'cksum':
D:/msys64/home/wlewis/branch_softfloat/src/slirp/cksum.c:75:18: warning: cast from pointer to intege
r of different size [-Wpointer-to-int-cast]
   75 |         if ((1 & (long) w) && (mlen > 0)) {
      |                  ^
[64/183] Building CXX object src/dimension/CMakeFiles/Dimension.dir/i860.cpp.obj
D:/msys64/home/wlewis/branch_softfloat/src/dimension/i860.cpp: In member function 'void i860_cpu_dev
ice::handle_trap(UINT32)':
D:/msys64/home/wlewis/branch_softfloat/src/dimension/i860.cpp:175:107: warning: suggest braces aroun
d empty body in an 'if' statement [-Wempty-body]
  175 |         Log_Printf(LOG_DEBUG, "[i860] Trap while DIM %s pc=%08X m_flow=%08X", trap_info(), s
avepc, m_flow);
      |
              ^
[65/183] Building C object src/slirp/CMakeFiles/Slirp.dir/ip_icmp.c.obj
D:/msys64/home/wlewis/branch_softfloat/src/slirp/ip_icmp.c: In function 'icmp_timestamp':
D:/msys64/home/wlewis/branch_softfloat/src/slirp/ip_icmp.c:470:5: warning: implicit declaration of f
unction 'gettimeofday'; did you mean 'mingw_gettimeofday'? [-Wimplicit-function-declaration]
  470 |     gettimeofday(&tv, NULL);
      |     ^~~~~~~~~~~~
      |     mingw_gettimeofday
[70/183] Building C object src/cpu/CMakeFiles/gencpu.dir/gencpu.c.obj
ninja: build stopped: subcommand failed.

Will experiment more later.

wlewisiii

With Andreas help, I was able to get 2.9 to compile using msys2's Mingw64 environment. You will need the most recent version of SDL2 - 2.85.5 - for windows and after compiling you'll need all of the various dll's in the same directory as the executable for it to run properly but it does work.

Thank you for the help, sir, would still be confused without it.

protocol7

Hi Andreas! It's great to see Previous still being developed. I love the new screenshot function but would like to use a different keyboard shortcut. Holding down ctrl+alt will also change the NeXT cursor.

I tried changing the shortcut to SDLK_PRINT but got "error: 'SDLK_PRINT' undeclared (first use in this function)" when compiling. A quick change to F9 compiled without error, but also didn't work.

Where do I declare SDLK_PRINT? I wasn't able to find anything helpful online.

Or maybe there's somewhere I could change the global modifier to ctrl+shift instead?

andreas_g

Hello protocol7,

glad there are still some users out there! You do not have to recompile Previous for changing the shortcuts. There are two ways to circumvent your screenshot/cursor problem:
  • In the Keyboard options select "Swap cmd and alt" to map the alt key to cmd and thus prevent the cursor from changing when using the shortcut combination or
  • open the preferences file in some text editor and set kScreenshot = PrintScreen under [ShortcutsWithoutModifiers]. Here is a list with all SDL2 key names.

I hope this fixes your issue! Feel free to report any further problems.

protocol7

Thanks Andreas! I had to compile Previous anyway as I'm running it on Debian so tweaking the source a little isn't a big deal.

I came back to post that I managed to remap ctrl+alt to ctrl+shift (by editing shortcut.c) and it works fine. But I'll revert that and try setting the screenshot shortcut in the config so I won't have to make that change anytime there's an update.

andreas_g

Your problem did inspire me to make a quick change to Previous' GUI. The Keyboard options dialog now shows the actual shortcuts instead of the default shortcuts. If you modify the preferences file the modifications will be reflected in the shortcuts list. The change is in branch_softfloat (r1370) and will be included in the next release.

Update: I'll also include short instructions on how to change the shortcuts including a link to the key names list in the readme.

protocol7

Sounds good!

For some reason I thought that the print screen key would work in Previous when the mouse is grabbed (otherwise it will launch the Gnome screen capture tool) but it doesn't. So I just used the swap cmd-alt option instead and that does the trick.

andreas_g

It is a known issue that Previous' shortcuts can overlap with host system shortcuts. This behaviour is caused by SDL. Maybe they will fix it with SDL3. On the other hand most operating systems intend some shortcuts to be available globally which makes sense for the most part.

wlewisiii

I'll attempt it either way but has anyone here built Previous on Solaris 10/Sparc recently? Just so I can get some head's up.

I got my Sun Blade 2500 (dual 1.6ghz USIIIi/8gb ram/XVR-600 graphics - decent workstation for 2004... O_O ) up and reloaded again and it would be fun to have Previous on it too. So I'll try but any tips, tricks or hints are happily accepted ;)