WebAssembly port of Previous

Started by mihai, January 09, 2024, 11:59:05 PM

Previous topic - Next topic

andreas_g

Quote from: mihai on January 20, 2024, 12:55:02 PMOut of curiosity, what is required to get the clock in the NeXTSTEP 3.3 to be correct? I've installed the Y2K patch (the boot kernel is now displayed as "NeXT Mach 3.3: Tue Jul 13 10:33:44 PDT 1999: root(rebuilder):mk-171.14.0bj~22/RC_m68k/RELEASE_M68K") and newrtc.timecntr is correctly initialized with the current host time.

However, during the boot process I get the "WARNING: preposterous time in Real Time Clock - - CHECK AND RESET THE DATE" message and it's reset to Nov 11, 1994. This happens with a native build too (on my Apple Silicon Mac).

NeXTstep reads the timestamp from the filesystem. If the difference between that and the real time clock is too big it will set the real time clock to the filesystem time.

Best solution would be to enable networking and use the NTP feature.

mihai

Quote from: andreas_g on January 20, 2024, 01:26:20 PMNeXTstep reads the timestamp from the filesystem. If the difference between that and the real time clock is too big it will set the real time clock to the filesystem time.

Thanks. Do you happen to know what the maximum allowed difference is? I can periodically rebuild the disk image to pick up a more recent persisted date if it's on the order of months.

Enabling networking would be nice, but it needs additional support from the host/JavaScript side, so that's a bigger task.

andreas_g

Quote from: mihai on January 20, 2024, 03:28:45 PMDo you happen to know what the maximum allowed difference is?

It is two days.

cuby

IIRC mount checks the "last modified" date in the file system superblock, so it would probably suffice to change that date (a 4-byte Unix timestamp if I'm not mistaken) instead of recreating the whole disk image. However, I don't think there's a tool that can do this...

Rob Blessin Black Hole

Hello Mihai: Simply Incredible work ,absolutely amazing!  So under Preferences the calendar Icon, if you set a password for the me account and log out , then a login panel will appear where you can login as as root.  If you scroll all the way left you can set unix expert preferences and large file support. with root login you can then easily install the Y2k patch :) Also you would want to set a password for root before networking so it doesn't muck with netinfo. I'm looking at this tinkering that it is mostly outer icon shells this is one heck of a start .... just tried to launch nextlibrary bookshelves sysadmin bookshelves ... I'm not knocking anything as this is te coolest thing I've seen and I often wondered if it was possible to have a web based NeXTsolution.
Rob Blessin President computerpowwow ebay  [email protected] http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community  since 2/9/93

mihai

#20
I've deployed an updated version that has a larger disk image (1GB), right-click support and a few other tweaks. I also implemented support for grayscale blitting, so you can now run it as a regular Turbo: https://infinitemac.org/1994/NeXTSTEP%203.3?machine=NeXTstation+Turbo (https://infinitemac.org/run is the GUI for configuring custom instances).

Forgot to mention that Previous-side modifications are in https://github.com/mihaip/previous, if anyone is curious.

I'll be looking into adding support for all the of the machines that Previous supports. What is the best/most pristine source of 0.8, 0.9 and other early releases? https://winworldpc.com/product/nextstep/0x appears to be have already-installed hard disk images, I was not sure if there are other options?

mihai

I've added a somewhat cleaned up 0.8 image: https://infinitemac.org/1988/NeXTStep%200.8

It works well except that double-clicking is not registering and key events are showing repeated keys (in Terminal). Will need to look into how input events are being polled in the JS build under 0.8 (the native build does not have this issue).

andreas_g

Quote from: mihai on February 09, 2024, 01:21:43 AMIt works well except that double-clicking is not registering and key events are showing repeated keys (in Terminal). Will need to look into how input events are being polled in the JS build under 0.8 (the native build does not have this issue).

These issues are most likely timing related. Somehow the web assembly port of Previous runs way too fast. Not sure why, but it seems the timing system is broken. The delay between two clicks gets too long from the guest system's perspective and it sees keys pressed so long that it starts auto-repeating.

mihai

Quote from: andreas_g on February 09, 2024, 01:53:48 AMThese issues are most likely timing related. Somehow the web assembly port of Previous runs way too fast. Not sure why, but it seems the timing system is broken. The delay between two clicks gets too long from the guest system's perspective and it sees keys pressed so long that it starts auto-repeating.

Thanks for the pointer, that was indeed it. I was missing the host_real_time_offset check in the JS implementation, once I added that it's behaving better.

mihai

I've incorporated the other disk images that mikeboss had gathered in this thread. There's a filtered view of just NeXT images at https://infinitemac.org/?filter=next. I would appreciate any corrections for release dates (I used the kernel build time shown in verbose boots for ones where precise dates were not available) and changes to highlight in the description.

I also updated to the 3.1 release of Previous. andreas_g, is there a benefit to enabling ADB support for the Turbo machines? It would require some changes on my side (for the alternate key mappings) so I've thus far not done it.

andreas_g

Quote from: mihai on February 24, 2024, 11:38:51 PMandreas_g, is there a benefit to enabling ADB support for the Turbo machines?

It seems the ADB mouse is a bit less jumpy and the keyboard is a bit less susceptible to stuck modifier keys. But the benefits are minimal.