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.


Topics - Dave Yeo

Pages: [1] 2 3
1
Programming / getting a single keypress?
« on: May 16, 2022, 06:00:21 am »
Trying to fix the terminal control in mpg123 so things like pause work.
Example program which works on other systems but not on OS/2, at that sometimes hangs the system.
Ideas to get this to work?
Code: [Select]

#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/select.h>
#include <unistd.h>
#include <termios.h>

int term_fd = -1;

int get_key(int do_delay, char *val)
{
fd_set r;
struct timeval t;
t.tv_sec=0;
t.tv_usec=(do_delay) ? 1000 : 0;
FD_ZERO(&r);
FD_SET(term_fd,&r);
int n = select(term_fd+1,&r,NULL,NULL,&t);
if(n > 0 && FD_ISSET(term_fd,&r) && read(term_fd,val,1) == 1)
return 1;
return 0;
}


int main(int argc, char **argv)
{
if(argc >= 2)
term_fd = open("/dev/tty", O_RDONLY);
else
term_fd = STDIN_FILENO;
if(term_fd < 0)
{
perror("failure opening terminal input");
return 1;
}
fprintf(stderr, "terminal fd: %d\n", term_fd);

struct termios old_tio;
int termsetup = 0;
if(!tcgetattr(term_fd, &old_tio))
{
fprintf(stderr, "proper terminal setup\n");
struct termios tio = old_tio;
tio.c_lflag &= ~(ICANON|ECHO);
tio.c_cc[VMIN] = 1;
tio.c_cc[VTIME] = 0;
tcsetattr(term_fd,TCSANOW,&tio);
termsetup = 1;
}

char val = 0;
while(val != 'q')
{
if(get_key(1, &val))
fprintf(stderr, "got key: %c\n", val);
}

if(termsetup)
tcsetattr(term_fd,TCSAFLUSH,&old_tio);
if(term_fd > 0)
close(term_fd);
return 0;
}


2
Programming / i686 vs Pentium 4
« on: March 06, 2022, 07:56:47 am »
I know this has been discussed before, but I think we should revisit as Bitwise has decided to force us to the Netburst (Pentium 4) architecture and it is easier to make an argument here rather then at Github which no longer works well on out old browsers. ideally would be to make arguments here and then reference this thread on Github.
The main difference between the various i386 architectures is how things are optimized and whether simd (MMX, SSE, SSE2) intrinsic's are used. 

3
Programming / Building SDL2 (and later linking against it)
« on: February 06, 2022, 06:55:08 am »
OK, I almost have SDL2 building. Using this configure command,
Code: [Select]
sh ../SDL2-os2/configure 'LDFLAGS=-Zomf -Zhigh-mem -Zmap -Zbin-files' LIBS=-lcx 'CPPFLAGS=-idirafter=k:/usr/include/os2tk45'
Configure outputs,
Code: [Select]
SDL2 Configure Summary:
Building Shared Libraries
Building Static Libraries
Enabled modules : atomic audio video render events joystick haptic hidapi sensor power filesystem threads timers file loadso cpuinfo assembly
Assembly Math   : mmx 3dnow sse
Audio drivers   : OS/2
Video drivers   : OS/2
Input drivers   :
Enable virtual joystick APIs : YES
Using libsamplerate : NO
Using libudev       : NO
Using dbus          : NO
Using ime           : NO
Using ibus          : NO
Using fcitx         : NO

So it looks like it is pulling hidapi for joystick use. Possibly the OS/2 joystick support needs disabling.
Unluckily the build dies here,
Code: [Select]
libtool: compile:  gcc.exe -g -O3 -idirafter=k:/usr/include/os2tk45 -DUSING_GENERATED_CONFIG_H -Iinclude -IK:/work/SDL2-os2/include -idirafter K:/work/SDL2-os2/src/video/khronos -mmmx -m3dnow -msse -Wall -fno-strict-aliasing -DOS2EMX_PLAIN_CHAR -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -I/@unixroot/usr/include/libusb-1.0 -MMD -MT build/SDL_os2dive.lo -c K:/work/SDL2-os2/src/video/os2/SDL_os2dive.c  -DDLL_EXPORT -DPIC -o build/.lib/SDL_os2dive.o
K:/work/SDL2-os2/src/video/os2/SDL_os2dive.c:27:10: fatal error: mmioos2.h: No such file or directory
   27 | #include <mmioos2.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [build/SDL_os2dive.lo] Error 1

The CPPFLAGS=-idirafter=k:/usr/include/os2tk45 should put the toolkit last in the include path, yet mmioos2.h isn't found.

4
Internet / Simple Browser revisited.
« on: December 29, 2021, 04:30:20 am »
Starting a new thread about the latest simple browser as the last one got long and wandering.
I just realized that if you install qt5-qtwebengine-examples 5.15.2-1 (netlabs-rel) along with its dependencies (I'd suggest the corresponding debuginfo files as well), we get,
@unixroot\usr\lib\qt5\examples\webenginewidgets\simplebrowser\widgets\simplebrowser\simplebrowser.exe.
This is a newer one then the one that escaped and at least supports copy and paste for passwords and such. Still a simple browser with no bookmarks, url completion and so on but it displays a lot of sites that our other browsers puke on.
You will have to mark as much to load high as possible. I started with (in @unixroot\usr\lib)
Code: [Select]
highmem -c qt5*dll
Then discovered trying to play a youtube video consistently crashed with a sigtrap from code protecting allocating too much memory or such, so I did,
Code: [Select]
highmem -c av*dll
to mark all the FFmpeg DLL's to load high, this includes the ones used by Mozilla, probably a good idea on its own. There's likely a few more I haven't got around to as they're small.
The browser is still unstable, and it is slow, too slow on this 3.1Ghz I5 to play Youtube videos. Still for looking at the occasional page, it seems to work.
I'd also advise setting the VIRTUALADDRESSLIMIT as high as possible, 3072 here. The first simplebrowser came with a script that set a couple of environment variables, "KAI_AUTOMODE=DART" which is likely already set in ArcaOS and "QTWEBENGINE_CHROMIUM_FLAGS=--single-process" which could be set in the program object. I've tried with and without the "--single-process" and didn't notice much difference in my limited testing.
As said, it is crashy and has crashed silently a few times as well as locking up the computer. Also depressing when sites still complain that it is old and unsupported, while rendering the page fine.
 

5
Programming / AVX enabled Firefox
« on: February 19, 2021, 11:19:53 pm »
Finally got around to trying to build Firefox with -march=sandybridge. While the build works fine with -march=i686 or pentium-m, it dies with -march=sandybridge, doesn't seem to like the GCC basic_string<char>. Error log attached if anyone has any ideas.

6
Internet / Password Managers
« on: February 17, 2021, 05:01:52 am »
So I've been using the free edition of LastPass for a while. It works fairly well as a browser extension on both SM and FF with the old extension still supported. It also works well on my Android phone.
They're changing the terms next month so the free edition is only usable on mobile or desktop and I can't afford to pay for it.
So wondering what password managers people are using.

7
Storage / USB 3 Hard drives
« on: December 24, 2020, 05:50:26 am »
Hi, there's been various discussions about USB 3 hard drives here and on the testers list so I thought I'd start a new dedicated thread.
I've acquired a Seagate Slim Drive USB 3 2TB drive for backup purposes which worked well with USB 2, peaking at about 19 MB/s.
Now I acquired this, https://www.ebay.ca/itm/USB-C-PCI-E-Express-Card-USB-3-1-2-Port-Controller-Adapter-HUB/133124878295?hash=item1efedc6fd7:g:OCYAAOSwjm5dOpkd which showed up within 3 days in my mail. Unluckily the needed cables from a different supplier haven't shown up yet. So I lucked out and picked up a 6 foot USB C to USB A cable at London Drugs for $7 bucks, it's rated at 5Gb/s, USB 3 speed.
Testing by transferring an ArcaOS ISO using File Commander, I see speeds of 90-98 MB/s, under Linux, Using MC and an EXT4 partition, the speeds are about 100-110 MB/s for really big files with the odd really high peak. Seems pretty decent, at that testing with the Mozilla source tree (about 5GB's of mostly small files) it is still about 30 MB/s, speeding up for large files and slowing down for small files. It's actually faster then my SSD on a SATA 2 port and may be the fastest drive in my system.
Problems, I have a 1 TB JFS partition for backing up to. Given a power failure or system crash, chkdsk runs for hours before quitting  with
Code: [Select]
JFS0101: CHKDSK  Insufficient dynamic storage available for required workspace
(1,6). CHKDSK CANNOT CONTINUE.

I guess I'll repartition as even though after ejecting and remounting the drive seems fine, who knows.
The other problem is all attempts to benchmark with diskio or sysbench locks the system hard, requiring the big red button to reboot and that hours long chkdsk.
Copying files, using rsync and such seem to work fine.
I must say I'm impressed so far with the hard drive speed, unlike other reports. Not sure if due to the USB C controller or what.
Edit, USBTree reports,
Code: [Select]
USB driver version = 12.8
----- USB device tree ---------------------------------------------------------
DS 07f0=4ff8

Controller 0: USBXHCD$
Root Hub 0 (4 ports) 1B21:2142
  Port 1: Device 0BC2:AC2D (MSD)-(SCSI)-(BO)(MSD)-(SCSI) SS Seagate RSS LLC
...

8
Comments, Suggestions & Questions / Karma?
« on: October 16, 2020, 07:05:25 am »
Notice a new thing, karma, listed under a posting users name. Guess Martin has been playing or updating :)

9
Comments, Suggestions & Questions / Forum RSS Feed
« on: August 11, 2020, 04:42:23 pm »
Hi, I notice that the RSS feed for the Forum link on the main page seems broken. The other 5 feeds links seem fine.

10
Multimedia / freedb
« on: July 12, 2020, 05:50:41 am »
Well freedb is no more, so programs that depend on it for CD music metadata need upgrading.
What I'm using for LeechMP3 is gnudb.gnudb.org 8880 which is a mirror of the old freedb.
See http://www.gnudb.org/index.php along with usage at http://www.gnudb.org/howto.php
There may be other mirrors and somewhere album art, please post others.

11
Seems we're in danger of losing one of the benefits that the new web browser will bring, namely timely security updates. KDE is considering forking the project but realistically this would likely be untenable.
KDE discussion, https://mail.kde.org/pipermail/kde-community/2020q2/006098.html?print=cGh4
Discussion from the Qute (a QTWebEngine browser) take on it. https://mail.kde.org/pipermail/kde-community/2020q2/006121.html
And Qt's response, https://www.phoronix.com/scan.php?page=news_item&px=Qt-Open-Source-Statement

12
Mail-News / Enigmail
« on: February 23, 2020, 06:17:21 am »
I've built a test version of enigmail-1.9.7. I currently don't have the environment to test it beyond that it installs in Thunderbird and complains about not finding gnupg, next I'll try porting the latest GnuPG 1.4 and perhaps 2.x.
Please test, it should work on 38ESR and 45 ESR versions of SM and TB.

13
Comments, Suggestions & Questions / EDM?
« on: August 11, 2019, 07:08:40 pm »
Been trying to look at some articles on EDM but all I've been getting is
Quote
Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot contact the database server)

14
Comments, Suggestions & Questions / Expired certificate
« on: May 31, 2019, 04:38:39 pm »
So this morning SeaMonkey wouldn't connect to OS2World as the certificate had expired. I added an exception to connect but I guess it needs renewing.

15
Mail-News / Security fixes for Mozilla
« on: April 14, 2019, 02:30:10 am »
I've been experimenting with porting security fixes from tenfourfox, a Firefox fork for PowerPC Macs that was also forked from 45ESR. Currently at about 50 changesets, over a 100 security issues patched I believe. For testing I've uploaded,
https://bitbucket.org/dryeo/mozilla-os2/downloads/firefox-45.9.0.en-US.os2-Pentium-m-SUa1.zip which also has unofficial branding instead of nightly.
https://bitbucket.org/dryeo/dry-comm-esr31/downloads/thunderbird-45.8.0.en-US.os2-Pentium-m-SUa1.zip and
https://bitbucket.org/dryeo/dry-comm-esr31/downloads/seamonkey-2.42.9esr.en-US.os2-Pentium-M-SUa1.zip

Don't forget to turn off mozturbo before updating and marking DLLs to load high. Should only use the latest release RPM's

Pages: [1] 2 3