PCem version 10 is officially released!

 

  • New machines – AMI XT clone, DTK XT clone, VTech Laser Turbo XT, VTech Laser XT3, Phoenix XT clone, Juko XT clone, IBM PS/1 model 2011, Compaq Deskpro 386, DTK 386SX clone, Phoenix 386 clone, Intel Premiere/PCI, Intel Advanced/EV
  • New graphics cards – IBM VGA, 3DFX Voodoo Graphics
  • Experimental dynamic recompiler – up to 3x speedup
  • Pentium and Pentium MMX emulation
  • CPU fixes – fixed issues in Unreal, Half-Life, Final Fantasy VII, Little Big Adventure 2, Windows 9x setup, Coherent, BeOS and others
  • Improved FDC emulation – more accurate, supports FDI images, supports 1.2MB 5.25″ floppy drive emulation, supports write protect correctly
  • Internal timer improvements, fixes sound in some games (eg Lion King)
  • Added support for up to 4 IDE hard drives
  • MIDI OUT code now handles sysex commands correctly
  • CD-ROM code now no longer crashes Windows 9x when CD-ROM drive empty
  • Fixes to ViRGE, S3 Vision series, ATI Mach64 and OAK OTI-067 cards
  • Various other fixes/changes

Official download links:

PCem v10 for Windows
PCem v10 for Linux

 

I personally prefer PCem over DOSBox at the moment, as PCem runs the actual BIOS code, so it feels more like an actual vintage PC.  PCem does need a significantly more powerful machine to push it thought.

 

The client needs to access the internet!

But let’s not give them access to everything.

This is a common scenario I see, where someone needs to get updates to some magical software package on the internet.  Great.  And people just give them access to ANY site, which ends up being not only the internet (the intended destination) but the rest of their internal network.  Granted a good defense in the SDN world is inbound rules as well for each VM, but everything is never 100%.

RFC1918 defines our friends, the private address ranges:

     10.0.0.0        -   10.255.255.255  (10/8 prefix)
     172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
     192.168.0.0     -   192.168.255.255 (192.168/16 prefix)

However the solution to this fun filled problem is to grant them HTTP/HTTPS access to the inverse of this.  Enter the netmask command.  You can give it a range, and it’ll lay out what networks to you need to add like this:

     netmask -c 0.0.0.0:9.255.255.255
     0.0.0.0/5
     8.0.0.0/7

Now I can exclude everything right up until 10.0.0.0/8 !

It’s quite the handy tool, but I didn’t see any Windows version.  So a few minutes with MinGW, and dealing with it’s weird Makefile’s way of linking things, and here you go!

This way you can permit internet access, not give them inside, access and still have a global DENY actually work.

YAY.

And if anyone is interested here are the networks:

     0.0.0.0/5
     8.0.0.0/7
    11.0.0.0/8
    12.0.0.0/6
    16.0.0.0/4
    32.0.0.0/3
    64.0.0.0/2
   128.0.0.0/3
   160.0.0.0/5
   168.0.0.0/6
  172.0.0.0/12 
 172.32.0.0/11
 172.64.0.0/10
 172.128.0.0/9
   173.0.0.0/8
   174.0.0.0/7
   176.0.0.0/4
   192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.169.0.0/16
192.170.0.0/15
192.172.0.0/14
192.176.0.0/12
192.192.0.0/10
   193.0.0.0/8
   194.0.0.0/7
   196.0.0.0/6
   200.0.0.0/5
   208.0.0.0/4

Yes, I know it’s a LOT of typing.

You can run VxWorks too!

(this is a guest post from Tenox)

VxWorks is an embedded operating system that typically runs on things like Mars probes, Boeing 787 or Apache helicopters, but today you can run it too! WindRiver has an evaluation target that you can run on an Intel CPU, meaning you can spin it up on your favorite hypervisor at home.

Go to this page: http://www.windriver.com/evaluations/bsp/ register, download the two ZIP files and follow the instructions.

VxWorks running on VMwareVxWorks comes with two shell modes C and admin. In C shell you execute C code and you can write simple programs or even patch existing running code like they did on Mars Pathfinder. This is the default one with -> prompt. You can enter to admin shell by typing “cmd”. If you are familiar with KSH “vi” mode you can use it for history and editing command line.

The evaluation target is very basic and limited. If you want to do and learn more stuff, you need to download evaluation of VxWorks Platform and spin up the VxWorks Simulator, or build your own target. This is a picture of a slightly older version running on Windows:

vxworks-emulatorThe operating system was also recently featured in Forbes

Local mirrors:

20 years of OpenBSD

puffy58Yes, 20 years!

The list announcement:

OpenBSD's source tree just turned 20 years old.

I recall the import taking about 3 hours on an EISA-bus 486 with 
two ESDI drives.  There was an import attempt a few days earlier, 
but it failed due to insufficient space.  It took some time to 
repartition the machine.

It wasn't terribly long before David Miller, Chuck Cranor and 
Niklas Hallqvist were commiting... then more people showed up.

The first developments were improvements to 32-bit sparc.

Chuck and I also worked on setting up the first 'anoncvs' to make 
sure noone was ever cut out from 'the language of diffs' again.
I guess that was the precursor for the github concept these 
days :-).  People forget, but even FSF was a walled garden at 
the time -- throwing tar files with vague logs over the wall 
every couple months.

I was lucky to have one of the few 64Kbit ISDN links in town,
otherwise this would not have happened.  My desktop was a 
Sparcstation 10; the third machine I had was a very slow 386.

The project is now at:

~322,000 commits
~44 commits/day average
~356 hackers through the years

I thought I’d try OpenBSD 2.0 SPARC on Qemu!  Well either with SUN PROMs, or OpenBIOS the result is the same, it crashes when initializing the SCSI bus.

ok boot disk0:b
Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@0,0:b File and args:
>> OpenBSD BOOT [$Revision: 1.2 $]
Booting /bsd @ 0x4000
1179616+113448+93300+[48552+53058]=0x16f46e
(if this doesn’t work, fix pmap_bootstrap4m in pmap.c)[ preserving 101620 bytes of bsd symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

OpenBSD 2.0 (GENERIC) #2: Thu Oct 10 17:50:37 MDT 1996
deraadt@sun4c:/usr/src/sys/arch/sparc/compile/GENERIC
real mem = 33165312
avail mem = 29028352
using 404 buffers containing 1654784 bytes of memory
bootpath: /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0:b
mainbus0 (root): SUNW,SPARCstation-5
cpu0 at mainbus0: FMI,MB86904 @ 1169 MHz, MB86910 or WTL1164/5 FPU
cpu0: physical 16K instruction (32 b/l), 8K data (16 b/l) cache NOT enabled for 4/0 cpu/mmu combination
obio0 at mainbus0
clock0 at obio0 addr 0x71200000: mk48t08 (eeprom)
timer0 at obio0 addr 0x71d00000 delay constant 73
auxreg0 at obio0 addr 0x71900000
zs0 at obio0 addr 0x71100000 pri 12, softpri 6
zs0a: console i/o
zs1 at obio0 addr 0x71000000 pri 12, softpri 6
[slavioconfig at obio0] addr 0x71800000 not configured
power0 at obio0 addr 0x71910000
fdc0 at obio0 addr 0x71400000 pri 11, softpri 4: chip 82077
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
iommu0 at mainbus0 addr 0x10000000: version 5/0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 584.500 MHz
dma0 at sbus0 slot 5 offset 0x8400000: rev 2
esp0 at dma0 slot 0x5 offset 0x8800000 pri 4: ESP200 40Mhz, target 7
scsibus0 at esp0
trap type 0x29: pc=f80e2494 npc=f80e2498 psr=4001bc0<EF,S,PS>
panic: trap
Stopped at _Debugger+0x4: jmpl [%o7 + 0x8], %g0
db>

But you can play kernel hangman, if you are into that kind of thing.

But make no mistake, the new 5.8 release (just released!) boots up just fine on Qemu:

Welcome to OpenBIOS v1.1 built on Jun 17 2015 18:50
Type ‘help’ for detailed information
Trying disk…
Not a bootable ELF image
Loading a.out image…
Loaded 66648 bytes
entry point is 0x4000
bootpath: /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0

Jumping to entry point 00004000 for type 00000005…
switching to new context:
>> OpenBSD BOOT 2.11
Booting bsd
Loading at physical address 400000
1316320+2139464+409400=0x3b0604
cannot open /etc/random.seed: No such file or directory
console is ttya
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved. http://www.OpenBSD.org

OpenBSD 5.8 (RAMDISK) #23: Sun Aug 9 00:08:29 GMT 2015
[email protected]:/usr/src/sys/arch/sparc/compile/RAMDISK
real mem = 117309440 (111MB)
avail mem = 111083520 (105MB)
mainbus0 at root: SUNW,SPARCstation-5
cpu0 at mainbus0: MB86904 @ 170 MHz, MB86910 or WTL1164/5 FPU
cpu0: 16K instruction (32 b/l), 8K data (16 b/l), 512K external (32 b/l) cache enabled
obio0 at mainbus0
clock0 at obio0 addr 0x71200000: mk48t08 (eeprom)
timer0 at obio0 addr 0x71d00000: delay constant 73, frequency 2000000 Hz
zs0 at obio0 addr 0x71100000 pri 12, softpri 6
zstty0 at zs0 channel 0: console
zstty1 at zs0 channel 1
zs1 at obio0 addr 0x71000000 pri 12, softpri 6
zskbd0 at zs1 channel 0: no keyboard
zstty2 at zs1 channel 1: mouse
fdc0 at obio0 addr 0x71400000 pri 11, softpri 4: chip 82077
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
auxreg0 at obio0 addr 0x71900000
power0 at obio0 addr 0x71910000
slavioconfig at obio0 addr 0x71800000 not configured
chosen “reg” property length = -1 (need multiple of 12)
builtin “reg” property length = -1 (need multiple of 12)
iommu0 at mainbus0 addr 0x10000000: version 0x5/0x0, page-size 4096, range 64MB
sbus0 at iommu0: 21.250 MHz
dma0 at sbus0 slot 5 offset 0x8400000: rev 2
esp0 at dma0 offset 0x8800000 pri 4: ESP200, 40MHz
scsibus0 at esp0: 8 targets, initiator 7
sd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.4.> SCSI3 0/direct fixed
sd0: 6MB, 512 bytes/sector, 12288 sectors
cd0 at scsibus0 targ 2 lun 0: <QEMU, QEMU CD-ROM, 2.4.> SCSI3 5/cdrom removable
ledma0 at sbus0 slot 5 offset 0x8400010: rev 2
le0 at ledma0 offset 0x8c00000 pri 6: address 52:54:00:12:34:56
le0: 16 receive buffers, 4 transmit buffers
tcx0 at sbus0 slot 3 offset 0x800000 pri 9: 1024x768x8
wsdisplay0 at tcx0
wsdisplay0: screen 0 added (std, sun emulation)
“SUNW,CS4231” at sbus0 class serial slot 4 offset 0xc000000 not configured
“power-management” at sbus0 slot 4 offset 0xa000000 not configured
bootpath: /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@0,0
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/sparc 5.8 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?

Just don’t bother with the ‘install diskette’ try the miniroot instead.

Adding ncurses into Qemu!

Text mode.. text mode..

Text mode.. text mode..

One thing that’s always bugged me about the Qemu 1.0 and higher is that they don’t print anything to the Win32 console.  So you have to go digging around in stdout.txt or stderr.txt .  Very annoying.  And of course Windows users can’t have the nice ‘curses’ text mode interface.  Or can they?

While I was re-updating the 4.4LiteBSD MIPS Qemu package, I turned off the normal SDLmain so that it now acts like a console binary, meaning that stdout/stdin now function properly.  So if Qemu had a problem, you can see it!

And while I was in the source, I thought why not see how hard it is to manually turn on curses?  It’s a quick one liner to config-host.mak (since it’s not detecting) then updating everywhere it has <curses.h> hard coded to use <ncurses.h> …. I guess I could have made a symlink, but whatever.  It links and more importantly I can run text mode MS-DOS in text mode!

To activate simply use the -curses flag.

Rest assured that SDL is still in there as well.  But now you can see error messages like this:

C:\qemu>qemu-system-i386.exe -L pc-bios -m 16 -soundhw sb16
dsound: Could not initialize DirectSoundCapture
dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID

So now you know there may or maynot be issues… In this case, I don’t care about recording audio, so it doesn’t matter.

I’ve updated the existing files on my server, so simply re-download.  Otherwise for new people my i386 only package (~4MB) is here:

qemu-2.4.0.1_win32-x86_x86_64.7z

And the ‘full system’ package (~22MB) is here:

qemu-2.4.0.1_win32-all.7z

For the two of three people who like this kind of thing..

LiteBSD

So I stumbled onto LiteBSD while I was trying to see if I can cross compile 386BSD 0.0 from Windows (it compiles, but triple faults on boot.)

LiteBSD is a 4.4 BSD derived OS for PIC32MZ microcontrollers.

And to make things more fun, Serge Vakulenko has a Qemu fork that includes these simulators so you can run them on Linux and OS X.

So what about us poor Windows users?

Well a few tweeks, and only one annoying bug remains, but it’s easy enough to sidestep and it runs!

4.4BSD-Lite

4.4BSD-Lite

Even better, I got the console to kind of work, although you can still control+c it to kill Qemu.  I guess I could capture the signal being kind of UNIXy.

For some reason when opening the SD card image, it’s already open by the time pic32_sdcard_init is called.  Or so I suspect.  It gets the file handle of 3 which tells me that it shouldn’t be open.  So my fix is lame but it works.  Since something is holding the file that I can’t see, I launch Qemu like this:

qemu-system-mipsel.exe -machine pic32mz-wifire -nographic -serial vc -serial vc -serial vc -serial mon:stdio  -bios boot-wifire.hex -kernel vmunix.hex -hda litebsd.img

with the SD/HDA being litebsd.img but in pic32_sdcard_init I do this:

sprintf(newfname,”%s.SD”,filename);

So you need a dummy file named litebsd.img (it’s just junk but it needs to exist), so whatever is blocking it will block it, then let pic32_sdcard_init open the file litebsd.img.SD which is the real file.

C:\litebsd>qemu-system-mipsel.exe -machine pic32mz-wifire -nographic -serial vc -serial vc -serial vc -serial mon:stdio -bios boot-wifire.hex -kernel vmunix.hex -hda litebsd.img
WARNING: Image format was not specified for ‘litebsd.img’ and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the ‘raw’ format explicitly to remove the restrictions.
Board: chipKIT WiFire
Processor: microAptivP
RAM size: 512 kbytes
Load file: ‘boot-wifire.hex’, 6916 bytes
Load file: ‘vmunix.hex’, 522408 bytes
sdcard: opened d->fd 3
Card0 image ‘litebsd.img’, 339969 kbytes
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

4.4BSD-Lite build 13 compiled 2015-01-20
sergev@ubuntu-sergev:LiteBSD/sys/compile/WIFIRE.pic32
cpu: PIC32MZ2048ECG100 rev A4, 200 MHz
oscillator: system PLL div 1:6 mult x50
real mem = 512 kbytes
avail mem = 344 kbytes
using 18 buffers containing 73728 bytes of memory
spi1 at pins sdi=D14/sdo=C1/sck=D1
spi2 at pins sdi=F0/sdo=D11/sck=G6
spi3 at pins sdi=B10/sdo=C4/sck=B14
spi4 at pins sdi=F5/sdo=G0/sck=D10
uart1 at pins rx=F1/tx=D15, interrupts 112/113/114
uart4 at pins rx=F2/tx=F8, interrupts 170/171/172, console
sd0 at port spi3, pin cs=C3
sd0: type I, size 339968 kbytes, speed 12 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kbytes
sd0c: partition type b7, sector 475138, size 102400 kbytes
bpf: sl0 attached
bpf: lo0 attached
WARNING: preposterous clock chip time — CHECK AND RESET THE DATE!

starting file system checks.
/dev/rsd0a: file system is clean; not checking
starting network
clearing /tmp
standard daemons: update.
Wed Dec 10 21:06:39 PST 2014

4.4BSD-Lite (bsd.net) (tty4)

login:

So there it is!  As always, you can do the whole telnet console, on port 2023 like the SPARC with:

qemu-system-mipsel.exe -machine pic32mz-wifire -nographic -serial vc -serial vc -serial vc -serial mon:telnet:127.0.0.1:2023,server,wait  -bios boot-wifire.hex -kernel vmunix.hex

In this case, I prefer to use the ‘wait’ portion of the server, so I can watch it boot.  Maybe I’m just weird.  But this way you can control+c to your hearts content.

As always, you can download my image here.

Also for those who like graphical serial connections (???) you can launch it like this:

qemu-system-mipsel.exe -machine pic32mz-wifire  -serial vc -serial vc -serial vc -serial vc  -bios boot-wifire.hex -kernel vmunix.hex -sd litebsd.img

And use control+alt and hunt around for s3, and you’ll have your console….. That you can’t paste into.

**EDIT I found out I forgot to link this with static libgcc so there were missing DLL’s.  sorry, I’ve re-linked and now it’ll just work out of the box (tested with clearing my path on Windows 10).  Next I need to add curses support.

For my dear friend snejannatr

Password strength

Yes I see you trying to login as me.  Yes I blocked your Russian and Ukrainian addresses.

What are you so desperate to see here?

There is no deep secret files, or drafts.

If anything I get into trouble for revealing too much when I do find stuff.

Take it easy man, there really isn’t anything to see here.