Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mentore

Pages: [1] 2 3 ... 15
1
Programming / Re: [SDL2] SDL_ListModes and emulation
« on: October 31, 2024, 09:11:30 am »
So I tried building fuse. For spectrum I used these configure arguments,
Code: [Select]
--without-libgcrypt --prefix=/@unixroot/usr/local LDFLAGS="-Zomf -Zhigh-mem -lcx"
and for Fuse,
Code: [Select]
--prefix=/Fuse-160 --without-x --without-gtk --disable-gtk3 --with-sdl  LDFLAGS="-Zomf -Zhigh-mem -lcx" LIBS="-lbz2 -lz"  LIBSPECTRUM_CFLAGS=-I/@unixroot/usr/local/include LIBSPECTRUM_LIBS=-l/@unixroot/usr/local/lib/spectrum.a 2>&1 | tee configure.log
and had to add to peripherals/ttx2000s.c, in the include area around line 37,
Code: [Select]
#ifdef __OS2__
#include <libcx/net.h>
#endif

I see configure output,
Code: [Select]
checking whether SDL UI requested... yes
configure: WARNING: SDL 2 not supported for the UI, using SDL 1 instead
checking for sdl-config... /@unixroot/usr/bin/sdl-config
checking for SDL - version >= 1.2.4... yes
and at the end,
Code: [Select]
****************************
*** Libspectrum features ***
****************************

Internal GLib replacement: no
zlib support: yes
bzip2 support: yes
audiofile support: no

********************
*** Fuse options ***
********************

User interface: sdl
Using SDL 2: no
Joystick support: yes
Using libjsw for joystick support: no
zlib support: yes
libxml2 support: yes
libpng support: yes
Available audio drivers: sdl  null
Selected audio driver: sdl
Spectranet support: yes
SpeccyBoot support: no
TTX2000 S support: yes
Desktop integration: no

Type 'make' to compile Fuse

Unluckily, it crashes while, I think, trying to show the settings. fuse --help does work. Perhaps due to lack of utilities? All I feel like doing right now as I'm not really interested in the emulator.

Thanks a lot Dave, I skipped the network support and some other things in order to obtain something working.
Quite possibly you are experiencing my same problem - SDL initialization fails due to SDL_LoadModes returning a 3 value array but with only one mode valid (the other two crash initialization).
I'll surely take your work into account as soon as I can.

Mentore

2
Programming / Re: [SDL2] SDL_ListModes and emulation
« on: October 30, 2024, 11:00:39 pm »
Hi Mentore

I have not played any ZX Spectrum games in many years, would not mind having another go at pacman as I think the Speccy version was the best.

Starfighter (downloaded from hobbes) is an SDL2 game that runs in a window so SDL2 for OS/2 should not be fullscreen only.

However, Starfighter does not work with SDL2 files installed by ANPM - currently at 2.0.18-3 -   but requires an earlier package http://hobbes.nmsu.edu/download/pub/os2/dev/SDL2-2.0.4-20160225.zip in order to run.

So, I guess the question is: Are you using the right variant of SDL2?


Regards

Pete

Thanks Pete. Indeed I already saw some SDL2 games on OS/2 working in windowed mode so yes, I guess my SDL2 install might be the culprit.
Feel free to fetch one of my ZX Spectrum emulators and try them: the 'net is literally full of snapshots and tape images to play, including some really great gems of the past which still stand the test of time (remember Jetpac?).
I'll have a look at different SDL2 implementations and maybe - with a little luck - repack the software with the good one for my port.

Mentore

3
Programming / Re: [SDL2] SDL_ListModes and emulation
« on: October 30, 2024, 10:58:11 pm »
The SDL2 rpm also works if linked against it. Are you perhaps using a 3D (OpenGL) surface? They're not supported.

Hi Dave,
the call to SDL_ListModes is done against a SWSURFACE so I guess it's the software renderer.
Maybe the best course of action is to take a look at the SDL2 games ported on OS/2 and see what I can do with them - I used the libraries and the runtimes taken from the RPM archive.
I won't be able to get back to my OS/2 VM until the next Monday, so I guess the next few days will be silent from this side.
Still I'm really exhalted from being able to port such a nice piece of software on OS/2, even if it's for my deep love for the ZX Spectrum.

Mentore

4
Programming / [SDL2] SDL_ListModes and emulation
« on: October 30, 2024, 12:29:37 pm »
You guys, something interesting here.
First of all the good news: I FINALLY got to compile a working release of FUSE, one of the best ZX Spectrum emulators available as open source https://sourceforge.net/projects/fuse-emulator/.

Configure and Make went successful but I encountered two major problems:

  • the font file fuse.font used in the SDL version got broken during compilation. I solved it replacing the broken one with a pre-compiled version from a Debian distribution. OK, I cheated, but too little time to investigate on this;
  • The executable crashed during SDL graphic mode initialization.

In the source file ui/sdl/sdldisplay.c there's a function named

uidisplay_init( int width, int height )

which calls SDL_ListModes like this:

modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_SWSURFACE);

where modes is of type SDL_Rect **modes; as per documentation.

I noticed that SDL_ListModes returns three available modes but only the first one seems somehow valid.
Trying to access modes[1] or modes[2] immediately crashed the program. SDL documentation was not helpful as I hoped.

The obvious solution was to force selecting modes[0] like this


#if defined (__OS2__)
   mn = 0; // Remove useless warning
   mw = modes[0]->w;
   mh = modes[0]->h;
   fprintf (stderr, "OS/2 system: resolution is %d x %d\n\r", mw, mh);
#else
...rest of original code follows...


I'm currently uploading everything on Hobbes, with source and utilities.
Did someone else encounter this problem? It seems almost like SDL2 under OS/2 works only in full screen mode. This may also explain why I can't start sUQLx (a Sinclair QL SDL emulator) in windowed mode, even if I try to force it.

Mentore

5
Hardware / Re: Mouse, Trackpoint, Trackpad, Touchpad - I2C Question
« on: October 30, 2024, 08:41:01 am »
Thanks Mentore for taking a look at it.

I feel ashamed of myself that I just found out that I2C exists and the wikipedia page says it is from 1982.

Why I want to know more about I2C and be able to take some kind of hardware report from it? I would like to see if just like pci.exe we can recognize the several trackpoint/trackpad brands/moedls like Synaptics, Elan or ALPS that we usually have on Thinkpads.

Regards

This is indeed interesting because I2C is a nasty little creature lying and working under the hood. I really am not sure if there's something under OS/2 able to directly work on it, even as a bunch of IOCTLs (I am rather sure it needs a ring 0 driver).

Hobbes archive contains basically 0 elements, the same goes for eCSoft/2 so I'm afraid we're in the same situation of the bluetooth stack. Sad but we get to work with what we have available.
Mentore

6
Hardware / Re: Mouse, Trackpoint, Trackpad, Touchpad - I2C Question
« on: October 29, 2024, 08:18:33 am »
Hello

At Warpstock I was talking to Lewis about ArcaOS mouse support, and how annoying is the issus that we love the trackpoint, but the trackpad (touchpad) is a problem to us because we don't have the "Ignore Palm rest" feature that the Thinkpad utilities support. Yes, we can disable the trackpad if it is available on the BIOS, but I said that it will be more elegant to have a way to disable with software (like in other platforms).

Lewis talk about that the Trackpoint and Trackpad is connected via I2C and that I may open a ticket to see if AMouse may support to disable the trackpad in the future.

But I want to know more about I2C.  (I guess is this one https://en.wikipedia.org/wiki/I%C2%B2C )
- Is there a way to list (just like pci.exe or lsusb.exe) the devices that are plugged in I2C ? Under OS/2, or even Windows.
I would like to know if there is a way to recognize which chipset is installed on my machine and see which models are the most common for us.

Regards

Hi Martin,
I found this for now:
https://github.com/mozilla-b2g/i2c-tools/blob/master/tools/i2cdetect.c

Since this uses the linux kernel, it may be impossible even to compile it under OS/2.
Let me take a look later in the morning (here in Italy it's 8.18 AM).
Mentore

- Update -
As I thought, no results.
All projects use some special Linux OS driver, so I can't even start compiling.

Mentore

7
General Discussion / Re: Resource Compiler - Joke
« on: October 26, 2024, 05:35:36 pm »
There are too few coders for OS/2 for this situation to be real.  :) And standardizing the resource compiler is a good idea.

Well, I'm afraid that would be no joke either. Actually though, I think we could use a single resource compiler.
What would be the standard? We may start from the latest WRC, but where do we want to go?

(Clearly I'm no expert in this part. So bear with me if I touch an already clear point.)

Mentore

8
Programming / Re: harfbuzz (TeX Live)
« on: October 18, 2024, 10:20:34 am »
Hi Mentore

Iirc Has Ko a port from meson

Ah that's good! I didn't know it. Great job, Dave!

Quote
Just wonder did you port Harfbuzz static or shared ?

Greetz Tellie

Usually I build only static libraries - I'm not sure where I read it's best not to build shared libraries.
I'll give it a try, I think - by the way I'll put my work on HobbesArchive ASAP.

(In the meantime I almost completed TeX Live! Hope I'll have it done the next week.)

Mentore

9
Programming / Re: harfbuzz (TeX Live)
« on: October 17, 2024, 12:12:07 pm »
Yeah was about to ask what your CFLAGS are :) good stuff for working it out.

Thanks Paul, indeed I should have thought about it before :)
by the way: harfbuzz compiled OK, I'm trying to build TeX Live. Fingers crossed...

10
Programming / Re: harfbuzz (TeX Live)
« on: October 17, 2024, 10:26:18 am »
Possibly related to freetype2's TT_OS2 struct?
Harfbuzz is used along with freeetype2 and fontconfig, it does fine spacing between fonts and heights of ascenders and descenders or similar. Important in some Indian scripts and perhaps some Middle Eastern scripts.

The Mozilla harfbuzz does have this to quiet some stderr spamming, from hb-private.hh
Code: [Select]
#ifndef HB_INTERNAL
# if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__)
#  define HB_INTERNAL __attribute__((__visibility__("hidden")))
# else
#  define HB_INTERNAL
# endif
#endif

This may be useful. Gonna try today as soon as I have time.
Mentore

Didn't find this header in the current source tree, but I got a hint and #undef-ined OS2 from CFLAGS and CPPFLAGS.
Built without errors, just some warnings.

Will let you know how far I reach in TeX.

Mentore

11
Programming / Re: harfbuzz (TeX Live)
« on: October 17, 2024, 10:01:35 am »
Possibly related to freetype2's TT_OS2 struct?
Harfbuzz is used along with freeetype2 and fontconfig, it does fine spacing between fonts and heights of ascenders and descenders or similar. Important in some Indian scripts and perhaps some Middle Eastern scripts.

The Mozilla harfbuzz does have this to quiet some stderr spamming, from hb-private.hh
Code: [Select]
#ifndef HB_INTERNAL
# if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__)
#  define HB_INTERNAL __attribute__((__visibility__("hidden")))
# else
#  define HB_INTERNAL
# endif
#endif

This may be useful. Gonna try today as soon as I have time.
Mentore

12
Programming / Re: harfbuzz (TeX Live)
« on: October 17, 2024, 10:00:26 am »
Mentore posted the error already. Harfbuzz is at hrafbuzz.org. Guess they've moved to Meson for building otherwise I'd try

Right you are David. I was thinking about porting Meson, but it seems a lot of work. Still I intend to give it a try.
In the meantime harfbuzz is still buildable with the old CMake stuff.

Mentore

13
Programming / harfbuzz (TeX Live)
« on: October 16, 2024, 02:08:41 pm »
Hello all,
I'm in the process of compiling the latest version of TeX live for OS/2.
I just stopped with a really strange error (make log attached) regarding namespaces and I can't wrap my head around it.
Searching this forum for harfbuzz I found it in the wonderful Qt6 development thread from the GOAT, Paul Smedley, so the question is:
is harfbuzz somehow available under OS/2? Or, on a second instance, is it possible to work around this (for me) never seen problem?

I feel we could use a new TeX version...

Thanks all
Mentore

14
Too bad. I only fixed SDL2. I cannot even find the SDL that we use.
Maybe it's time to build a version of dosbox that uses SDL2.

Hmm, looking, DosBoxes last release was 5 years back, so likely no SDL2 support though I didn't find build instructions.
There are forks such as DosBox-X, https://dosbox-x.com/ which would be nice to have. Even it comes with an intree heavily modified SDL as well as support for SDL2. This one would be nice to have as it is expanded to run most DOS apps including Win9x.
There is also SDL3 now

SDL3 would be a good add-on to our video libraries. What is really sad is the lack of OpenGL support - though I guess it is almost useless without a real accelerated video driver. But alas, an OpenGL comeback on OS/2 would allow porting many applications. I know - we are a little community.

But let me dream  8)

Mentore

15
Programming / Re: Classic, Regina, Object and Open Object Rexx
« on: October 03, 2024, 08:17:29 am »
Is Open Object Rexx (by RexxLA) what was/called NetRexx? I vaguely remember some presentation on some Warpstock Europe some time ago...

AFAIK, Andi, NetRexx was/is (?) something related to Java: quoting the NetRexx website
"NetRexx is a general-purpose programming language inspired by two very different programming languages, Rexx and Java."

Though I feel Netrexx and ooRexx have many things in common, ISTR there is also a converter from / to Netrexx under OS/2.

Mentore

Pages: [1] 2 3 ... 15