Jump to content
IGNORED

jzintv Christmas update


intvnut

Recommended Posts

9 minutes ago, Zendocon said:

I compiled the source with no issues.  Am I still using Makefile.termux_sdl2, or was everything consolidated into one Makefile?

I left the Termux Makefiles as-is for now.  If you're up for an experiment, I'd like you to try the following experiment:

  • In jzintv/src/buildcfg/:
    • ln -s 00-compiler-termux-clang.mak.txt 00-compiler.mak
    • ln -s 10-opt-for-native.mak.txt 10-opt.mak
  • Then try building with the Linux default Makefiles in jzintv/src:
    • SDL1: make -f Makefile.linux_sdl1 clean ; make -f Makefile.linux_sdl1
    • SDL2: make -f Makefile.linux_sdl2 clean ; make -f Makefile.linux_sdl2

If those work, then we can retire the Makefile.termux* files.

Link to comment
Share on other sites

On 5/29/2020 at 2:29 AM, intvnut said:

Well, if you want to try to help me reheat Tim Lindner's port to MacOS Classic, I suppose I can dig those files back out.  They're in the revision history.

 

How many extensions are there out there now?  I search for  bin, int, itvrom, and cc3 currently.

Then there is no file extension at all on the Lives! and Rocks! CDs. ?

Link to comment
Share on other sites

15 hours ago, intvnut said:

I left the Termux Makefiles as-is for now.  If you're up for an experiment, I'd like you to try the following experiment:

  • In jzintv/src/buildcfg/:
    • ln -s 00-compiler-termux-clang.mak.txt 00-compiler.mak
    • ln -s 10-opt-for-native.mak.txt 10-opt.mak
  • Then try building with the Linux default Makefiles in jzintv/src:
    • SDL1: make -f Makefile.linux_sdl1 clean ; make -f Makefile.linux_sdl1
    • SDL2: make -f Makefile.linux_sdl2 clean ; make -f Makefile.linux_sdl2

If those work, then we can retire the Makefile.termux* files.

I created the two symlinks and then ran the builds.  In both cases, I immediately got two instances of this error message:

buildcfg/00-compiler.mak:164: *** missing 'endif'.  Stop.

Should be an easy one to solve.

Link to comment
Share on other sites

In 00-compiler-termux-clang.mak.txt, I commented out a duplicate instance of

ifeq ($(USE_SANI),1)

and that did the trick.  I was able to build with SDL1 just now.  I'll try testing both the SDL1 and SDL2 builds.

Edited by Zendocon
Syntax correction
Link to comment
Share on other sites

Both builds are behaving the same way as before.  With my proprietary window manager, the SDL1 build appears in the top left corner with a titlebar, and the SDL2 build appears in the center of the screen with no titlebar.  As for the mouse, with SDL1 the pointer disappears when it's hovered over the window, but not with SDL2.  That may explain the difference in reaction to mouse "input events".

Link to comment
Share on other sites

18 hours ago, Zendocon said:

Both builds are behaving the same way as before.  With my proprietary window manager, the SDL1 build appears in the top left corner with a titlebar, and the SDL2 build appears in the center of the screen with no titlebar.  As for the mouse, with SDL1 the pointer disappears when it's hovered over the window, but not with SDL2.  That may explain the difference in reaction to mouse "input events".

The calls to SDL_ShowCursor in gfx/gfx_sdl2.c control whether jzIntv hides the mouse cursor when it's over the window.  I did change that behavior between SDL1 and SDL2 and was planning on possibly backporting the change to SDL1, actually.

 

You can try changing them to always hide the mouse (SDL_ShowCursor(SDL_DISABLE)) and see if that improves the stutters you see when the mouse moves.  Or, it's possible you're seeing the freezes these folks also saw: https://github.com/kivy/python-for-android/issues/2169

 

I still have no idea why it doesn't show you the window border.  I call SDL_SetWindowBordered and set it to SDL_TRUE.  I did see a comment about the Wayland display target lacking client-side window decorations here: https://bugzilla.libsdl.org/show_bug.cgi?id=3948#c3

If you add the command line flag --gfx-verbose, it'll print what video and render driver it's selected.

 

Link to comment
Share on other sites

7 hours ago, intvnut said:

You can try changing them to always hide the mouse (SDL_ShowCursor(SDL_DISABLE)) and see if that improves the stutters you see when the mouse moves.  Or, it's possible you're seeing the freezes these folks also saw: https://github.com/kivy/python-for-android/issues/2169

Yes, that worked.  I made the change in both places.  No more mouse pointer, and no more slowdown when moving the mouse (unless another window gets the focus; wm2 uses the SloppyFocus model).

 

The window border does appear when the jzintv window has focus.  I'm just not getting a titlebar.  Again, if I switch back to twm, I do get the titlebar, so it's however wm2 gets the title from the SDL2 build.

 

I forgot to mention, the SDL2 build is still returning 1 when exiting on user request.

Link to comment
Share on other sites

14 hours ago, Zendocon said:

I forgot to mention, the SDL2 build is still returning 1 when exiting on user request.

I figured out what's going on with that. After printing the "normal exit" message, I call cfg_dtor(), which wipes the value of the exit flag, and leads to me returning 1.  It'll be fixed in the next release.

 

14 hours ago, Zendocon said:

I'm just not getting a titlebar.  Again, if I switch back to twm, I do get the titlebar, so it's however wm2 gets the title from the SDL2 build.

I do set the window title, initially to "jzintv" in SDL_CreateWindow, and updating later with the cartridge name and year via SDL_SetWindowTitle.

 

Can you report which video driver and render backend --gfx-verbose report for the SDL2 build?

Edited by intvnut
Link to comment
Share on other sites

16 hours ago, Zendocon said:

The window border does appear when the jzintv window has focus.  I'm just not getting a titlebar.  Again, if I switch back to twm, I do get the titlebar, so it's however wm2 gets the title from the SDL2 build.

I dug into the SDL2 source code. On a call to SDL_SetWindowBordered(), if the window manager does not support _MOTIF_WM_HINTS, then the code blindly sets the WM_TRANSIENT_FOR hint regardless of the border enable flag, marking the window as transient (aka. a pop-up dialog).

 

Looking at the wm2 source code, it won't display the title tab on transient windows, if I understood the code correctly.  And, it doesn't seem to look for the _MOTIF_WM_HINTS, either.

 

I would say try commenting out the calls to SDL_SetWindowBordered().  However, it appears that won't work:  SDL unconditionally calls the internal SetWindowBordered function as part of X11_CreateWindow.

 

I don't know how comfortable you are with recompiling SDL2 yourself, and pointing jzIntv to your own SDL2 compile.  But, if you are comfortable with it, we can try a simple hack of commenting out this call to X11_XSetTransientForHint() (or conditionalize it on border == SDL_FALSE) and see if that fixes the issue.

 

I could also try a hack that just "goes around" SDL's X11 driver and manages the WM_TRANSIENT_FOR property directly on builds that support X11.  This wouldn't be the first place jzIntv went around SDL2 to work around an SDL2 bug.

 

That would be here.  On MacOS X devices, the Metal graphics backend leaves the target color space unset, resulting in "unmanaged color."  Now, anyone who has participated in the "What are the right colors?" threads might guess, that throws any attempt at getting it correct right out the window.  It might look right on my monitor and wrong on yours.  However, it seems that with a single monitor, it seemed to mostly do the right thing, giving me something like sRGB.  Mostly.

 

With multiple monitors with different color profiles, the unmanaged mode does seriously weird things.  In particular, the pool of render buffers that Metal uses can end up using a mix of color profiles if you drag the window between monitors.  In the best case scenario, it uses the starting monitor's color profile everywhere.  The colors look right on one monitor, and wrong on the others.  In the worst case scenario, it toggles between the different monitors' color profiles every frame.  The result is a window that shimmers weirdly:  It flickers between multiple different color profiles.  I lost a couple days figuring that one out.

 

One I figured it out, the fix was simple:  Ask SDL for a pointer to the Metal layer (which fortunately it has a hook for on OS/X), and manually set our color space to the device-independent sRGB color space.  Now when you drag a window between monitors, the colors match and you never get the weird shimmer I mentioned.  That fix is in the recent release.

 

Now just to add to the fun future possibilities:  I could also set the color space to DisplayP3 instead, and get something that can display the NTSC color gamut, and actually have a chance at correct colors!  But... it requires out-of-range colors passed directly to Metal, and SDL doesn't really support that.  There may be a way around it by abusing palettes and going around SDL2 to create a palette with the full-gamut colors.  But, that's way more science project than I care to bite off, and it only benefits Mac.

 

I just want to get all the immediate issues causing folks heartburn with jzIntv off my plate so I can stop thinking about jzIntv for a bit and get focused on LTO Flash again.

Edited by intvnut
clarifications, grammar, more links
  • Like 1
Link to comment
Share on other sites

3 hours ago, intvnut said:

I dug into the SDL2 source code. On a call to SDL_SetWindowBordered(), if the window manager does not support _MOTIF_WM_HINTS, then the code blindly sets the WM_TRANSIENT_FOR hint regardless of the border enable flag, marking the window as transient (aka. a pop-up dialog).

 

Looking at the wm2 source code, it won't display the title tab on transient windows, if I understood the code correctly.  And, it doesn't seem to look for the _MOTIF_WM_HINTS, either.

 

I would say try commenting out the calls to SDL_SetWindowBordered().  However, it appears that won't work:  SDL unconditionally calls the internal SetWindowBordered function as part of X11_CreateWindow.

 

I don't know how comfortable you are with recompiling SDL2 yourself, and pointing jzIntv to your own SDL2 compile.  But, if you are comfortable with it, we can try a simple hack of commenting out this call to X11_XSetTransientForHint() (or conditionalize it on border == SDL_FALSE) and see if that fixes the issue.

SDL2 was a readily-available package in Termux, so tweaking that code is something I'd rather not do.  But I did have to tweak the code for wm2 in a few places, just to get it to compile.  I looked at Border::shapeTab and commented out the check for isTransient and recompiled.  No dice.  I'll try a few other places around here.

 

If the jzintv window is flagged as transient, then that explains why it's showing up in the center of the screen.  I liked it better off to one side, because my script currently draws the box image onto the root window, and pops up a window with the overlay image(s), all using feh.  For games that have multiple overlay images, the jzintv window clips the second overlay (I made a combined image in those cases).

 

I'm not using any other packages in X that display pop-ups, except maybe emacs-x, so I'm not concerned about inappropriate titlebars.

 

As for the video driver report you asked about:

gfx:  Searching for video modes near 1088x653x32, Windowed:
gfx:  Window pix format: SDL_PIXELFORMAT_ARGB8888
gfx: Could not create renderer with requested flags: Couldn't find matching render driver
     Trying again with software renderer, no VSync.
gfx:  Selected:  1088x653x32 with:
gfx:      VSync: No, Rend: Software, Windowed: Yes
gfx:      Video Driver: 'x11', Render Driver: 'software'

 

Link to comment
Share on other sites

Ha!  All I had to do was modify this function, starting at line 157.

Boolean Border::isTransient(void)
{
    return m_client->isTransient();
}

"return false;" did the trick.  I've got my titlebar back.  Now if I could get it moved away from the center of the screen, I can arrange all the other windows accordingly.

Link to comment
Share on other sites

  • 3 weeks later...
On 7/13/2020 at 7:51 PM, intvnut said:

I've finally uploaded an updated version here.  Release notes:


Release notes for 2020-07-12.  (SVN r2110)
Updates since 2020-06-07.  See ReleaseNotes_20200607.txt for earlier updates.

---------------
 New features:
---------------

 

I ported new sources VERY EASILY on the nintendo switch, and it seems to work great.

 

This time I just had to add a couple of "#ifdef __SWITCH__" in just two files, elfi.c and config.h

 

Great job!

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Trying to build SDL2 (on Ubuntu 16), ended with a 1 for exit status. Probably some pathing problem, can anyone help me get a clue? I grabbed SDL 2.0.12 source and put it into an "SDL2" directory. Thanks!

 

/tmp/jzintv/src$ sudo make
make: execvp: ./buildcfg/svn_rev.sh: Permission denied
make: execvp: ./buildcfg/svn_dty.sh: Permission denied
make: sdl2-config: Command not found
/bin/sh: 1: sdl2-config: not found
/bin/sh: 1: sdl2-config: not found
gcc -std=gnu99 -o plat/plat_lib.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -DUSE_GNU_READLINE -c plat/plat_lib.c
gcc -std=gnu99 -o event/event.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c event/event.c
gcc -std=gnu99 -c -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -o svn_revision.o svn_revision.c
gcc -std=gnu99 -o plat/plat_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c plat/plat_sdl.c
gcc -std=gnu99 -o plat/main_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c plat/main_sdl.c
gcc -std=gnu99 -o event/event_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c event/event_sdl.c
gcc -std=gnu99 -o event/event_sdl2.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c event/event_sdl2.c
gcc -std=gnu99 -o gfx/gfx_sdl2.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c gfx/gfx_sdl2.c
gcc -std=gnu99 -o gfx/gfx_scale.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c gfx/gfx_scale.c
gcc -std=gnu99 -o gfx/gfx_prescale.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c gfx/gfx_prescale.c
gcc -std=gnu99 -o snd/snd_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c snd/snd_sdl.c
gcc -std=gnu99 -o joy/joy_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c joy/joy_sdl.c
gcc -std=gnu99 -o mouse/mouse_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY= -c mouse/mouse_sdl.c
g++ -std=c++14 -o ../bin/jzintv jzintv.o pads/pads_intv2pc.o cfg/cfg.o cfg/usage.o cfg/mapping.o misc/crc32.o misc/crc16.o misc/avl.o misc/ll.o misc/file_crc32.o misc/types.o misc/jzprint.o misc/printer.o plat/plat_lib.o plat/gnu_getopt.o plat/plat_gen.o event/event.o event/event_tbl.o gfx/palette.o gfx/gfx.o mvi/mvi.o debug/debug.o debug/debug_dasm1600.o util/symtab.o debug/source.o periph/periph.o cp1600/cp1600.o cp1600/op_decode.o cp1600/op_exec.o cp1600/emu_link.o cp1600/op_exec_ext.o cp1600/req_q.o cp1600/tbl/fn_cond_br.o cp1600/tbl/fn_dir_2op.o cp1600/tbl/fn_imm_2op.o cp1600/tbl/fn_impl_1op_a.o cp1600/tbl/fn_impl_1op_b.o cp1600/tbl/fn_ind_2op.o cp1600/tbl/fn_reg_1op.o cp1600/tbl/fn_reg_2op.o cp1600/tbl/fn_rot_1op.o cp1600/tbl/formats.o mem/mem.o icart/icart.o icart/icartrom.o icart/icartbin.o icart/icartfile.o icart/icarttag.o icart/icarttag_authors.o icart/icarttag_printer.o stic/stic.o  pads/pads.o pads/pads_cgc.o ay8910/ay8910.o ecs/ecs.o ivoice/ivoice.o speed/speed.o minilzo/minilzo.o file/file.o file/elfi.o lzoe/lzoe.o metadata/metadata.o metadata/cfgvar_metadata.o metadata/icarttag_metadata.o metadata/print_metadata.o bincfg/bincfg.o bincfg/bincfg_grmr.tab.o bincfg/bincfg_lex.o  bincfg/legacy.o gif/gif_enc.o gif/lzw_enc.o demo/demo.o  name/name.o name/name_list.o serializer/serializer.o jlp/jlp.o scale/scale2x.o scale/scale3x.o locutus/locutus.o locutus/luigi.o locutus/locutus_adapt.o locutus/locutus_types.o locutus/loc_to_bin.o locutus/bin_to_loc.o locutus/rom_to_loc.o zlib/deflate.o zlib/adler32.o zlib/trees.o zlib/zutil.o avi/avi.o cheat/cheat.o svn_revision.o plat/plat_sdl.o plat/main_sdl.o event/event_sdl.o event/event_sdl2.o gfx/gfx_sdl2.o gfx/gfx_scale.o gfx/gfx_prescale.o snd/snd_sdl.o joy/joy_sdl.o mouse/mouse_sdl.o -O3  -flto=auto -ffat-lto-objects    -I. -I..    -DUSE_SDL2   -DJZINTV_VERSION_MAJOR=0x01 -DJZINTV_VERSION_MINOR=0x00 -DJZINTV_SVN_REV= -DJZINTV_SVN_DTY=  -lrt -lreadline -ltermcap -Wl,--defsym=setpwent=0 -Wl,--defsym=getpwent=0 -Wl,--defsym=endpwent=0 -Wl,--defsym=getpwuid=0 -Wl,--defsym=getpwnam=0
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `gfx_init.constprop.0':
<artificial>:(.text+0x6661): undefined reference to `SDL_DestroyTexture'
/usr/bin/ld: <artificial>:(.text+0x6676): undefined reference to `SDL_FreeFormat'
/usr/bin/ld: <artificial>:(.text+0x668b): undefined reference to `SDL_DestroyRenderer'
/usr/bin/ld: <artificial>:(.text+0x669f): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: <artificial>:(.text+0x66d0): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: <artificial>:(.text+0x66f4): undefined reference to `SDL_GetWindowSize'
/usr/bin/ld: <artificial>:(.text+0x66fc): undefined reference to `SDL_GetWindowPixelFormat'
/usr/bin/ld: <artificial>:(.text+0x6706): undefined reference to `SDL_GetPixelFormatName'
/usr/bin/ld: <artificial>:(.text+0x6726): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: <artificial>:(.text+0x6738): undefined reference to `SDL_GetError'
/usr/bin/ld: <artificial>:(.text+0x675b): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: <artificial>:(.text+0x676f): undefined reference to `SDL_AllocFormat'
/usr/bin/ld: <artificial>:(.text+0x678a): undefined reference to `SDL_CreateTexture'
/usr/bin/ld: <artificial>:(.text+0x67a4): undefined reference to `SDL_QueryTexture'
/usr/bin/ld: <artificial>:(.text+0x67eb): undefined reference to `SDL_GetRendererInfo'
/usr/bin/ld: <artificial>:(.text+0x67f3): undefined reference to `SDL_GetWindowFlags'
/usr/bin/ld: <artificial>:(.text+0x69d5): undefined reference to `SDL_MapRGB'
/usr/bin/ld: <artificial>:(.text+0x6a11): undefined reference to `SDL_GetNumVideoDisplays'
/usr/bin/ld: <artificial>:(.text+0x6a29): undefined reference to `SDL_ShowCursor'
/usr/bin/ld: <artificial>:(.text+0x6a2e): undefined reference to `SDL_PumpEvents'
/usr/bin/ld: <artificial>:(.text+0x6a3d): undefined reference to `SDL_ShowWindow'
/usr/bin/ld: <artificial>:(.text+0x6a4c): undefined reference to `SDL_RaiseWindow'
/usr/bin/ld: <artificial>:(.text+0x6b69): undefined reference to `SDL_GetCurrentVideoDriver'
/usr/bin/ld: <artificial>:(.text+0x6bf0): undefined reference to `SDL_SetWindowBordered'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `snd_init.constprop.0':
<artificial>:(.text+0x727c): undefined reference to `SDL_OpenAudio'
/usr/bin/ld: <artificial>:(.text+0x77ca): undefined reference to `SDL_BuildAudioCVT'
/usr/bin/ld: <artificial>:(.text+0x7876): undefined reference to `SDL_PauseAudio'
/usr/bin/ld: <artificial>:(.text+0x79ef): undefined reference to `SDL_GetError'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `joy_init.constprop.0':
<artificial>:(.text+0x7c8b): undefined reference to `SDL_NumJoysticks'
/usr/bin/ld: <artificial>:(.text+0x8c64): undefined reference to `SDL_JoystickOpen'
/usr/bin/ld: <artificial>:(.text+0x8c74): undefined reference to `SDL_JoystickName'
/usr/bin/ld: <artificial>:(.text+0x8c96): undefined reference to `SDL_JoystickNumAxes'
/usr/bin/ld: <artificial>:(.text+0x8cab): undefined reference to `SDL_JoystickNumBalls'
/usr/bin/ld: <artificial>:(.text+0x8cc0): undefined reference to `SDL_JoystickNumHats'
/usr/bin/ld: <artificial>:(.text+0x8cd5): undefined reference to `SDL_JoystickNumButtons'
/usr/bin/ld: <artificial>:(.text+0x8ced): undefined reference to `SDL_JoystickGetAxis'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `gfx_refresh.constprop.0':
<artificial>:(.text+0xb6dd): undefined reference to `SDL_MapRGB'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `snd_play_silence.constprop.0':
<artificial>:(.text+0xb8a7): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0xb929): undefined reference to `SDL_PauseAudio'
/usr/bin/ld: <artificial>:(.text+0xb92e): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `cfg_init.constprop.0':
<artificial>:(.text+0x11f3c): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x11f48): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x11f54): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x11f6b): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x11f7a): undefined reference to `SDL_EventState'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o:<artificial>:(.text+0x11f89): more undefined references to `SDL_EventState' follow
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans0.ltrans.o: in function `cfg_init.constprop.0':
<artificial>:(.text+0x11ffc): undefined reference to `SDL_JoystickEventState'
/usr/bin/ld: <artificial>:(.text+0x12004): undefined reference to `SDL_PollEvent'
/usr/bin/ld: <artificial>:(.text+0x1371e): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x1372d): undefined reference to `SDL_EventState'
/usr/bin/ld: <artificial>:(.text+0x1373c): undefined reference to `SDL_EventState'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans1.ltrans.o: in function `joy_emu_link.lto_priv.0':
<artificial>:(.text+0x5f00): undefined reference to `SDL_JoystickGetButton'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans1.ltrans.o: in function `snd_dtor.lto_priv.0':
<artificial>:(.text+0x5fff): undefined reference to `SDL_CloseAudio'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans1.ltrans.o: in function `snd_fill.lto_priv.0':
<artificial>:(.text+0x6511): undefined reference to `SDL_ConvertAudio'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans1.ltrans.o: in function `snd_tick.lto_priv.0':
<artificial>:(.text+0x8aaf): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0x8b5e): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x8c01): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0x8c25): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x8c3e): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0x8c69): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x8f5d): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0x8f8b): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x915b): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x9348): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text+0x935f): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x955a): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text+0x956e): undefined reference to `SDL_PauseAudio'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_toggle_windowed':
<artificial>:(.text+0x5b49): undefined reference to `SDL_SetWindowFullscreen'
/usr/bin/ld: <artificial>:(.text+0x5bb6): undefined reference to `SDL_SetWindowFullscreen'
/usr/bin/ld: <artificial>:(.text+0x5bd0): undefined reference to `SDL_GetNumVideoDisplays'
/usr/bin/ld: <artificial>:(.text+0x5be3): undefined reference to `SDL_ShowCursor'
/usr/bin/ld: <artificial>:(.text+0x5be8): undefined reference to `SDL_PumpEvents'
/usr/bin/ld: <artificial>:(.text+0x5bf1): undefined reference to `SDL_ShowWindow'
/usr/bin/ld: <artificial>:(.text+0x5bfa): undefined reference to `SDL_RaiseWindow'
/usr/bin/ld: <artificial>:(.text+0x5c25): undefined reference to `SDL_GetWindowSize'
/usr/bin/ld: <artificial>:(.text+0x5c81): undefined reference to `SDL_ShowCursor'
/usr/bin/ld: <artificial>:(.text+0x5c86): undefined reference to `SDL_PumpEvents'
/usr/bin/ld: <artificial>:(.text+0x5c8f): undefined reference to `SDL_ShowWindow'
/usr/bin/ld: <artificial>:(.text+0x5c98): undefined reference to `SDL_RaiseWindow'
/usr/bin/ld: <artificial>:(.text+0x5cae): undefined reference to `SDL_ShowCursor'
/usr/bin/ld: <artificial>:(.text+0x5cb3): undefined reference to `SDL_PumpEvents'
/usr/bin/ld: <artificial>:(.text+0x5cbc): undefined reference to `SDL_ShowWindow'
/usr/bin/ld: <artificial>:(.text+0x5cc5): undefined reference to `SDL_RaiseWindow'
/usr/bin/ld: <artificial>:(.text+0x5cd3): undefined reference to `SDL_SetWindowBordered'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_flip.lto_priv.0':
<artificial>:(.text+0x5d54): undefined reference to `SDL_SetRenderDrawColor'
/usr/bin/ld: <artificial>:(.text+0x5d5c): undefined reference to `SDL_RenderClear'
/usr/bin/ld: <artificial>:(.text+0x5d77): undefined reference to `SDL_RenderPresent'
/usr/bin/ld: <artificial>:(.text+0x5dbc): undefined reference to `SDL_RenderCopy'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_sdl_abort.lto_priv.0':
<artificial>:(.text+0x5dd6): undefined reference to `SDL_GetError'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_tick.isra.0.lto_priv.0':
<artificial>:(.text+0x5e47): undefined reference to `SDL_LockTexture'
/usr/bin/ld: <artificial>:(.text+0x5ff1): undefined reference to `SDL_UnlockTexture'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_refresh':
<artificial>:(.text+0x61f6): undefined reference to `SDL_MapRGB'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `gfx_dtor.lto_priv.0':
<artificial>:(.text+0x6918): undefined reference to `SDL_DestroyTexture'
/usr/bin/ld: <artificial>:(.text+0x692d): undefined reference to `SDL_FreeFormat'
/usr/bin/ld: <artificial>:(.text+0x6942): undefined reference to `SDL_DestroyRenderer'
/usr/bin/ld: <artificial>:(.text+0x6957): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `plat_quit':
<artificial>:(.text+0x5081): undefined reference to `SDL_Quit'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans20.ltrans.o: in function `main':
<artificial>:(.text.startup+0xda): undefined reference to `SDL_Init'
/usr/bin/ld: <artificial>:(.text.startup+0x4d9): undefined reference to `SDL_SetWindowTitle'
/usr/bin/ld: <artificial>:(.text.startup+0xf3b): undefined reference to `SDL_Delay'
/usr/bin/ld: <artificial>:(.text.startup+0x1276): undefined reference to `SDL_LockAudio'
/usr/bin/ld: <artificial>:(.text.startup+0x188c): undefined reference to `SDL_Delay'
/usr/bin/ld: <artificial>:(.text.startup+0x1ca4): undefined reference to `SDL_PauseAudio'
/usr/bin/ld: <artificial>:(.text.startup+0x1ca9): undefined reference to `SDL_UnlockAudio'
/usr/bin/ld: <artificial>:(.text.startup+0x1dd5): undefined reference to `SDL_GetError'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans22.ltrans.o: in function `speed_tk':
<artificial>:(.text+0x4c5b): undefined reference to `SDL_Delay'
/usr/bin/ld: /tmp/jzintv.VXUZ59.ltrans25.ltrans.o: in function `event_tick.lto_priv.0':
<artificial>:(.text+0x50b2): undefined reference to `SDL_PumpEvents'
/usr/bin/ld: <artificial>:(.text+0x515c): undefined reference to `SDL_PollEvent'
collect2: error: ld returned 1 exit status
make: *** [Makefile:116: ../bin/jzintv] Error 1

 

Link to comment
Share on other sites

2 hours ago, First Spear said:

Trying to build SDL2 (on Ubuntu 16), ended with a 1 for exit status. Probably some pathing problem, can anyone help me get a clue? I grabbed SDL 2.0.12 source and put it into an "SDL2" directory. Thanks!

 

You don't need to build jzIntv as root.  Just plain ol' make (or better, make -f Makefile.linux_sdl2) should do

 

It looks like whatever you used to unzip jzIntv didn't apply the "execute" bit to the scripts in src/buildcfg/, based on this part:

make: execvp: ./buildcfg/svn_rev.sh: Permission denied
make: execvp: ./buildcfg/svn_dty.sh: Permission denied

To fix that, run chmod +x buildcfg/*.sh from within the src directory.

 

For the rest:  jzIntv does not build or install SDL2 for you.  You'll either need to install the SDL2 devel package for your Linux distro, or compile and install SDL2 yourself.  On Ubuntu 16, sudo apt-get install libsdl2-dev should do the trick.  I'm pretty sure installing the "dev" package pulls the main libraries.  If not, sudo apt-get install libsdl2 gets the run time libraries.

 

The advantage of compiling and installing SDL2 yourself is that you'll get a newer SDL2.  According to this page, Ubuntu 16.04LTS defaults to 2.0.4, while the latest is 2.0.12.

 

For SDL2, IIRC, you can install it with something along the lines of:

(From within the SDL2-2.0.12 source top-level directory)

$ ./configure --prefix=/usr/local
... lots of configuration goes by ...
$ make -jN
... lots of compilation goes by ...
$ sudo make install

In the sequence above, replace "N" in make -jN with the number of CPUs you have, or a smaller number.  For example, if you 4 CPUs, make -j4 works reasonably well.  You can use Make's -j flag when building jzIntv as well.

 

On my 4 CPU Linux box, make -j4 brings the compilation time down from about 3 minutes to about 1 min 20 seconds.

 

BTW, I did a partial release the other day, to incorporate some bug fixes from July.  You can grab that source here:  http://spatula-city.org/~im14u2c/intv/dl/jzintv-20200822-src.zip

 

Once I get a chance to build R-Pi and Linux builds, I'll make it the official release.  The bugfixes are fairly minor.

 

Edited by intvnut
  • Like 1
Link to comment
Share on other sites

2 hours ago, intvnut said:

On my 4 CPU Linux box, make -j4 brings the compilation time down from about 3 minutes to about 1 min 20 seconds.

To be clear, that's jzIntv's compilation time.  SDL2 actually compiles faster, but they don't enable link-time optimization, and that's somewhat expensive.

Link to comment
Share on other sites

I compiled it on my tablet.  It seems wm2 is drawing the window decorations, but with a pixel offset to the right.  I can see just enough of the title bar, but none of the text.  The border across the top extends as many pixels past the right edge of the window.  It's still centered too, but I can deal with that.

Link to comment
Share on other sites

  • 1 year later...

Hi all, while playing with source code I just found a different behaviour between Windows SDL1 and SDL2 versions (thanks to event diagnostics)

in SDL2 version, if a key on the keyboard is pressed without release, a continous event KEY_DOWN is sent, while in SDL1 version not.

This does not seem to change the game experience ? 

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

Bumping the thread for an ongoing issue.

 

I have no programming abilities so all of this is quite foreign to me, but looking through this thread I don't see this issue addressed..

The SDL2 version is creating a strange issue whereas the entire screen is the color of whatever the game background is.  I posted a separate thread for this not realizing this thread was active with JzIntv.  I didn't expect any answers as it's really a Jzintv/RetroPie issue, not specifically an Intellivision issue.  But for anyone that uses RetroPie, there are only 2 options for running Inty games as we know.

 

I did get an answer from Lolonois, who is very knowledgable and a fan of JzIntv, on the RetroPie forum who wrote this...

 

I had a closer look at it and the colored background instead of black is related to the SDL2 implementation of jzintv.
These borders show not only up on a Rpi3 but also on a Rpi4 RetroPie installation on some games (=those which don't use black as background).

I tried also the intermediate release from August 2022 [1] but it did not have had an effect on this issue.

I haven't found a issue tracker for jzintv. But it seems the author runs by the handle intvnut in the atariage forum [2]. Maybe he can be challenged with this topic there.

I also noticed the borders top/bottom are not symmetrical when displaying on a 16:9 screen.

TL;DR seems there is no configurational fix at the moment for the SDL2 build of jzintv.

I might be able to dissect this but it will take some time.

[1] http://spatula-city.org/~im14u2c/intv/dl/jzintv-20200822-src.zip
[2] https://atariage.com/forums/topic/286411-jzintv-christmas-update/page/3/

 

Here are the shots I posted on the other thread...  I'm hoping someone can look into to this to resolve it.  It's definitely a deal breaker for using the newer SDL2 versions of  JzIntv in the RetroPie environment.  You can't set the screen size to full screen at any 4:3 res, and as you can see.. it colors the entire screen with background.  Falling back to an older version in the SDL1 build is an option, but you get pillar boarders on top and bottom no matter what screen res.  It's livable, but anyone new to loading JzIntv will never know how to fall back to an older version as it's not a simple task for a new user unfamilar with the Linux environment.

 

I hope this can be looked into.  Hate to see this amazing emulator not running at peak as the RetroPie versions move forward. 

 

Best regards,

JR

 

my post from the RetriPie forum:

https://retropie.org.uk/forum/topic/32433/jzintv-has-black-border-or-full-screen-color/4?_=1648489234877

 

 

 

sdl2.jpg

sdl1.jpg

Edited by IMBerzerk
Link to comment
Share on other sites

I'm using my own environment I built myself, not RetroPie, but from the look of it, it's using the Fullscreen switch (-f1) and probably a lower resolution.

 

If you can set switches, here are the ones you will probably want:

-f0 to disable fullscreen

-z3 for a higher display resolution (try tweaking this value)

-b6 to set the border size to 6 Intellivision pixels.  This is above and beyond the resolution above.

 

The SDL2 release from 20200712 was the only released version, and it has a couple bugs that I know of.  For one thing, when you BREAK to the debugger, it seems to echo an extra character.  When launching from PIDEjL/PIDEGS, it just quits.  It also sends a return code of 1 when exiting normally, which usually means there was an error.  I had to suppress checking for a nonzero return code in my BASH scripts.

Edited by Zendocon
Typo
  • Like 1
Link to comment
Share on other sites

5 hours ago, Zendocon said:

I'm using my own environment I built myself, not RetroPie, but from the look of it, it's using the Fullscreen switch (-f1) and probably a lower resolution.

 

If you can set switches, here are the ones you will probably want:

-f0 to disable fullscreen

-z3 for a higher display resolution (try tweaking this value)

-b6 to set the border size to 6 Intellivision pixels.  This is above and beyond the resolution above.

 

The SDL2 release from 20200712 was the only released version, and it has a couple bugs that I know of.  For one thing, when you BREAK to the debugger, it seems to echo an extra character.  When launching from PIDEjL/PIDEGS, it just quits.  It also sends a return code of 1 when exiting normally, which usually means there was an error.  I had to suppress checking for a nonzero return code in my BASH scripts.

Tried it on the old SDL1 version... no effect.  It's like it ignores the command to remove the boarders.  Maybe because it thinks it's either removed or borders are in place?

here is my runcommand line in emulators.cfg

 

I gave up on the SDL2 version.  Nothing changes the condition.

 

jzintv = "/opt/retropie/emulators/jzintv/bin/jzintv -z3 -v1 -q -b6 -f0 --gfx-palette=/opt/retropie/emulators/jzintv/tv_colors.txt --kbdhackfile=/opt/retropie/emulators/jzintv/hackfile.cfg --rom-path=/home/pi/RetroPie/BIOS %ROM%"
 

Edited by IMBerzerk
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...