GCC 1.27 & MS-DOS

Inspired by Building and using a 29-year-old compiler on a modern system, i thought I too could get this ancient version of GCC working.  At the time I never had bothered with the older version as I had always assumed that there were many fixes and adaptations to GCC  for it to run on MS-DOS via GO32/DJGPP.  However after doing this, its obvious that GO32/DJGPP was rather built around GCC’s stock output, which would sure make a lot more sense.

And it turns out that the target machine being an i386 Sequent running BSD is the best match, both in turns of underscores, and debugging format.  At first I had tried the AT&T SYSV i386 target, however it couldn’t link anything from the standard libraries that DJGPP has as they all have a leading underscore.  After starting to mess with internal macros to turn things on and off, and re-define how various portions of assembly are emittied, I found the Sequent target and went with that and everything was fine, and using the existing build infrastructure for GCC 1.39 I now could actually run hello world!

gcc_v1 -v -E hello.c -o hello.i
gcc version 1.39
cpp_v1 -v -undef -D__GNUC__ -DGNUDOS -Dunix -Di386 -D__unix__ -D__i386__ hello.c -o hello.i
GNU CPP version 1.39
gcc_v1 -v -S hello.i -o hello.s
gcc version 1.39
cc1_v1 hello.i -quiet -version -o hello.s
GNU C version 1.27 (80386, BSD syntax) compiled by GNU C version 5.1.0.
gcc_v1 -v -c hello.s -o hello.o
gcc version 1.39
as -o hello.o hello.s
gcc_v1 -v -o hello hello.o
gcc version 1.39
ld -o hello C:/dos/xdjgpp.v1/lib/crt0.o hello.o -lc

go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie

hello from DJGPP v1/GCC 1.39!

Wasn’t that great?  Then going through my ‘test’ programs I went to try to build the infocom interpreter, and that is when things went off the rails.

funcs.o: Undefined symbol __udivsi3 referenced from text segment
options.o: Undefined symbol __divsi3 referenced from text segment
options.o: Undefined symbol __divsi3 referenced from text segment
print.o: Undefined symbol __divsi3 referenced from text segment
print.o: Undefined symbol __udivsi3 referenced from text segment
support.o: Undefined symbol __divsi3 referenced from text segment
gcc_v1: Program ld got fatal signal 1.

I’ve had some issues with GCC and these ‘built in’ functions before.  This was an early major stumbling block back in the x68000 GCC days, where after a lot of searching I was able to find 68000 versions of various math routines that were in the native Hudson Soft assembler to link in.  While GCC 1.x does have a libgnu/gnulib to include these functions it warns you over and over to not use GCC to build them, but rather the native CC.  But the problem is that I don’t have a native CC.

But I managed to save myself after googling around by finding srt0.c from 386BSD.  Namely these two:

.globl ___udivsi3
___udivsi3:
  movl 4(%esp),%eax
  xorl %edx,%edx
  divl 8(%esp)
  ret

.globl ___divsi3
___divsi3:
  movl 4(%esp),%eax
  xorl %edx,%edx
  cltd
  idivl 8(%esp)
  ret

I ended up having to removing a single underscore, but now I could link infocom, and even better it runs!

Wanting to try something far more exciting, I went ahead and tried to build DooM.  However GCC 1.27 has an issue with m_fixed.c  I fired up GDB to at least take a look, although I’m not sure where the fault lies.

FixedMul
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Breakpoint 1, 0x752c5ad5 in msvcrt!_exit () from C:\WINDOWS\System32\msvcrt.dll
(gdb) bt
#0 0x752c5ad5 in msvcrt!_exit () from C:\WINDOWS\System32\msvcrt.dll
#1 0x752bb379 in msvcrt!abort () from C:\WINDOWS\System32\msvcrt.dll
#2 0x0045805c in final (first=0xe066a0, file=0x75312688 <msvcrt!_iob+128>, write_symbols=NO_DEBUG, optimize=0)
at final.c:653
#3 0x00403198 in rest_of_compilation (decl=0x722718) at toplev.c:1296
#4 0x0040fbce in finish_function () at c-decl.c:3272
#5 0x004040c0 in yyparse () at c-parse.y:224
#6 0x0040239d in compile_file (name=0xe00def "C:/dos/xdjgpp.v1/tmp/cca02992.cpp") at toplev.c:837
#7 0x00403a33 in main (argc=11, argv=0xe00f90, envp=0xe01598) at toplev.c:1556

With the code being:
#ifdef REGISTER_CONSTRAINTS
      if (! constrain_operands (insn_code_number))
        abort ();
#endif

So I assume some error with constrain_operands? Not that it makes it any better.  However I know this one file compiles fine with 1.39, and since we are on the i386 another alternative is just to used the assembly version that was hiding in the readme..

DooM mostly built by GCC 1.27

And much to my amazement, it works!  Keeping in mind that this is using an a.out tool chain, along with the last DPMI enabled GO32 extender.

Considering the compiler dates back from September 5th, 1988 it’s really great to see it running.

I’ll have to upload source (GCC 1.27/DooM) & binaries later.  But I imagine it should also run on EMX/RSX for a Win32 version.

DooM for the VIC 20

I just found out about this one, it’s DooM! … on an 8bit.  No really!

I was watching this video of the 8bit guy, and (jump to 19:20) he quickly mentions DooM on the VIC 20.

Over on Denial, The Commodore Vic 20 Forum  Kweepa did the seemingly impossible by using cc65 and some assembly for a somewhat cut down (haha!) DooM on the 8bit.  The source is even available on github.

It has cut down the video rendering obviously, but still has some of the C enemy AI logic, it’s a bit more like Wolf in that there is no height in the cut down levels, but wow it’s still amazing to see.  The sound effects were re-cut from the PC speaker stuff, and yes, even reduced versions of the MIDI music make the cut!

Naturally this won’t run on a stock 20, rather you need to get the maximum 37kb of RAM, and it requires a floppy disk drive.

It’s really cool to check out, and yes it runs on VICE.

I’m more so surprised that this didn’t ignite more 6502, or other non 32bit machine versions of DooM.  You can find download information for the d64 image here, and a direct link here.

AOL Instant messaging to end service.

From tumblr!

And they killed it from Tumblr.

AIM tapped into new digital technologies and ignited a cultural shift, but the way in which we communicate with each other has profoundly changed. As a result we’ve made the decision that we will be discontinuing AIM effective December 15, 2017. We are more excited than ever to continue building the next generation of iconic brands and life-changing products for users around the world.

Kind of insane to pay way too much money for something, to just turn around and kill it.

All I know is that whatever they think they are going to do, it’ll never have the reach and recognition as AIM.  Maybe there is reverse engineered servers, like Escargot for MSN.

Messing around with Vistapro 4.0

So I uh.. found this copy of Vistapro 4.0  And I though it would be fun to kick out an animation.  At 320×100 this took a whole 8 minutes to render on my laptop.

I though that was cool, but I was mistaken in thinking it was multi-threaded while it rendered. I have access to a machine with 16 processor cores, so I setup a rendering machine, and found out very quickly it was only using one core.  I think their final product Vistapro renderer may have used multiple cores although the company that sold it went bankrupt quite some time ago.  Anyways I rendered this animation at 1080p and it took about two hours.

For a while this kind of ‘virtual reality’ and desktop rendering of places was quite popular.  Although Vistapro originated on the Amiga, but without a numerical coprocessor and fast processor this may have taken weeks or months on a stock 68000.  I haven’t tried, and I’m in no hurry to find out.

I didn’t insert any music or audio, so it’s just 48 seconds of the camera going around.

Building Synchronet on Debian Stretch

Yay

I still run an ancient BBS, using Synchronet on OS/2.  The problem being that I not only get port scanned an incredible amount of times, but so many things out there now logon as root/root and they think they are on a Linux machine and can then shell script their way into some exploits.  Ive tried rate limiting, and other methods, but I end up with so many distributed connections that SIO can’t cope and it’ll crash.  A reboot will fix it, of course, but rebooting 2-3 times a day is a bummer.  So I thought I’d front my BBS with a stub BBS, which means building Synchronet from source.  And while there is some guides on how to do this, I naturally hit some weird undocumented error.

So yeah, get ready for this fun error:

jsapi.cpp: In function ‘JSIdArray* JS_Enumerate(JSContext*, JSObject*)’:
jsapi.cpp:3988:16: error: cannot convert ‘bool’ to ‘JSIdArray*’ in return
return false;

So it turns out that GCC 6 and higher won’t compile the older javascript engine that Synchronet relies on.  Ok, so I figured I would just fix the cast and go on my way.  But no, as part of the build process once it figures out that I’ve tampered with a file it’ll re-unpack the engine and break on the same error again.  And this is why I find things that try to be so ‘easy’ and holding (I’m looking at you Cmake!!!!) end up being totally black box, and absolutely useless.

So what I really need is g++ 4.x, and what is the quickest and easiest way to get the old compiler?  Ugh, grab the package from the prior version Jessie.  Seriously.  Add this into your /etc/apt/sources.list

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free

and then run:

apt-get update && apt-get install g++-4.9

And take the new line out of /etc/apt/sources.list or you will have hell to pay.

After that it was a matter of modifying some of the logon code to streamline the logon process, and to gut the ‘ham radio’ door into something that’ll telnet to the OS/2 BBS.  After a bit of work it actually works.  I even tested Zmodem, and that works too!

Logging into the proxy

I need some ASCII art or something.  That and probably turn off new user registration.  Guest access is all anyone can get on the proxy.

Telnet menu

I could probably do more here.  Years ago I ran some public access Ancient UNIX stuff, but the problems were that it got slammed from the internet.  But if Synchronet can keep up with the idiots on the outside, I guess this works as a jump point into something else?  I may have to see about adding some 386BSD, and Linux 1.0

QEMUOS2 via modern Synchronet

And here we are, at the old BBS.  I never got that many people to begin with, and I did like having the only OS/2 BBS on the internet up.  The other BBS O-Zone seems to have given up, as their domain expired.  So it’s just me, once more again.

I’m sure the vast majority of people won’t care, but I guess I finally hit the tipping point where 1996’s SIO just can’t keep up in 2017’s world of relentless port knocking.

Great rename in progress

I’m sure this will end well…

UPDATE wp_options SET option_value = replace(option_value, ‘https://virtuallyfun.com/’, ‘https://virtuallyfun.com/’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET guid = replace(guid, ‘https://virtuallyfun.com/’,’https://virtuallyfun.com/’);
UPDATE wp_posts SET post_content = replace(post_content, ‘https://virtuallyfun.com/’, ‘https://virtuallyfun.com/’);
UPDATE wp_postmeta SET meta_value = replace(meta_value,’https://virtuallyfun.com/’,’https://virtuallyfun.com/’);
UPDATE wp_options SET option_value = replace(option_value, ‘https://virtuallyfun.com/’, ‘https://virtuallyfun.com/’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET guid = replace(guid, ‘https://virtuallyfun.com/’,’https://virtuallyfun.com/’);
UPDATE wp_posts SET post_content = replace(post_content, ‘https://virtuallyfun.com/’, ‘https://virtuallyfun.com/’);
UPDATE wp_postmeta SET meta_value = replace(meta_value,’https://virtuallyfun.com/’,’https://virtuallyfun.com/’);

Since I had purchased virtuallyfun.com quite a while ago, and I had planned on doing this years ago, for some reason today felt like a good day.  I have had mappings in Apache to catch & rename links from a while back, but in reverse.  I have no plans on dumping superglobalmegacorp.com, but you have to admit it is quite long to type in, and the ‘non standard’ name for the blog no doubt wasn’t helping things.  I guess that makes 2017 the year of conformity.

As always, if you can read this, then it’s working.  Old links will continue to function so really nothing going on, same site, same crap, just flipped the aliases.

UX lessons from the Magic Screensaver aka After Dark

I found this kind of interesting, a breakdown from the original guy behind the once popular After Dark screen saver.

As it started as an experiment on Windows 2, it became a product on it’s own, and launched an entire industry, along with being copied by every major OS vendor.  In the 90’s having a screen saver was key, just as having simple games like solitaire, especially a broken shuffle one where the user wins most of the time led to Windows being heavily favored in the work space.

Magic Screen Saver for Windows 2

So for the heck of it, I figured I’d check it out, and as always thanks to Jason Scott, there is a copy of 1.02 on cd.textfiles.com And as reported it’s basically the ‘mystify your mind’ screen saver.

Magic in action

The runaway hit Magic Screensaver became After Dark, which then had several licensed addons like the Simpsons, Star Wars etc.  Back then themes for Windows were popular along with sound effects.  A lot of the functionality is still in Windows, although most people prefer that their machines are silent, only making audible alerts if there really is something wrong.  But back in the day a ‘multimedia desktop’ was a $5,000 noise maker, and not many offices were impressed.  Which of course gave rise to the ‘office sound card’

All Business and no fun!

Naturally under Windows there were virtual device drivers to emulate a sound blaster, as people still wanted to game with this cheaper ‘business audio’ card, although with the rise of Windows 95/Direct X gaming under Windows finally became a thing making Sound Blaster compatibility a thing of the past.

But going back to After Dark, they made a fatal error of teaming up with Berkeley Systems, who eventually started to make their own releases pushing the original team out of their own product.

After Dark 1.0 and the infamous flying toasters.

The toasters became focal in a few lawsuits, namely the Jefferson Airplane album, although it was dismissed as the artwork for the album had not been trademarked!  And they were able to force the Opus ‘n Bill screen saver where Opus shoots the toasters.  Late they changed the toasters to have propellers to avoid being too similar.

Opus shooting a flying toaster

Oddly stuff like screen savers too have largely fallen out of fashion with the rise of power saving monitors that just turn themselves off either from a lack of new images, or a signal from the OS.

One of those weird legacy things that in today’s world really doesn’t have that much meaning, but a scant 20 years ago was a major industry.

I built an AROS machine out of scrap!

Got to say it’s really cool that it works with hardware 3D acceleration.

I may want to try to do something with it later on, however I’ll need to get it a case.

I have a cold, and yeah sound like crap.  I’ll add specs later as I think my fever is kicking back in.  Sigh.  But yeah basically

  • P4 board / CPU / RAM $150 HKD
  • GTX-460 card $180 HKD
  • Sound Blaster Live! $20 HKD
  • 37GB IDE disk $20 HKD
  • PS/2 Keyboard $20 HKD
  • PS/2 Mouse $10 HKD
  • 700 Watt Power Supply $150 HKD

So yeah ~550 HKD or $70 USD.  Not bad.

So a little closer look at the hardware.  I’m lucky that there is an active used hardware market here in Hong Kong, elsewhere in the world you either have HAM radio events, ‘boot sales’, garage sales, or for the truly desperate, eBay, Yahoo auctions, and AliExpress.  My go to place here is of course the Capital Computer Centre, where they at least will test stuff before selling it.  I know I’m old fashioned but I like buying in person.

 

Intel P4 Mother Board

I had originally chosen this board to mess around with Darwin.  I wanted something new enough to have a P4, but old enough to still have an older ‘parallel’ EIDE controller port. And the Intel D945GNT, board certainly was up to that task.  Like ancient Darwin, AROS works best with either parallel disks, or SATA disks in older parallel emulation.  The markings on this board are a little hard to read as the bigger numbers are the product testing/radio compliance numbers, and the model number is a bunch of possible models as I guess they like to make so many variations on a single board.

close up of the D945GNT

Here is a close up, and E210882 is *NOT* the mode number.  Nothing like confusion.

The Intel D945GNT motherboards built in NIC, the Intel PRO/100

One of the big reasons for using the Intel board, is that it has an onboard NIC, and Intel of course uses Intel NIC’s so it has the very compatible Intel PRO/100 VE Desktop Adapter.

While you can get these on PCI cards, and use other boards, I figured since I was going to buy a board anyways, and once things get this old the people selling them really don’t care who made the board, but rather that this is an old P4 board, they all sell for the same price.

Another plus about this board is that it is new enough not to have AGP, but rather the new and exciting PCI Express.  This board as the Express x16, which of course is perfect for a ‘large’ GPU.  AROS has a port of the Gallium3D nouveau driver, making this perfect for a super cheap GTX 460.

I shopped around for a while and I found this accelerator, that although has no apparent labeling at least on the flip side it has the identification.  I really don’t know what is the fastest GPU you can get for AROS, but this one seems to work just fine, and it’s what Stephen Jones is using so that is what I went with.

Inno3D GTX-460

And looking under AROS, this is how the PCI resources show up for the video card.

NVIDIA GeForce GTX 460

This was an old card, and it looked like either the OEM didn’t put any stickers on it, or someone had taken them off.  Either way I don’t care, and it doesn’t matter as it works just fine.  Sure the GTX 1080 is over five times faster, but the open Gallium driver won’t work with it as Nvidia has done their best to break open stuff, and even if it did, you can’t buy a 1080 for less than a pizza.  At least not yet.

For some reason, I had begun collecting older and cheap Sound Blaster cards when I see them.  I wasn’t going to spend more than $50 HKD ($7 USD) for them, so I don’t have an Audigy cards yet, but I did have this Live card.  At the time I didn’t think it was anything special, although the EMU10k chip is desirable, and popular for much older systems.

Sound Blaster Live!

This card is the CT0100 model.  And it works great!

CT0100

And this is how AROS sees the card

Sound Blaster Live! with EMU10k1 chip

The AROS HCL is a little confusing to me, but it all seems to work.  If it weren’t for the Stephen Jones video I wouldn’t have tried as it implies it won’t work.

I have to admit that it’s impressive.  For anyone interested you can find AROS Icarus Desktop here, and here is Stephen Jones’s video that inspired me to see this run in real life!