Search found 62 matches

by shermanp
Sat 23 Jun, 2018 7:28 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

Just thought I'd post a quick update. I have got dynamic VHD support semi-working. Current status is that I can attach a pre-formatted image to PCem as a secondary drive, and copy some files to/from Windows 98. I have just tried installing Win 98 to a fresh (dynamic) VHD (including formatting).... I...
by shermanp
Tue 12 Jun, 2018 4:50 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

I have tested the newly implemented VHD support in how many scenarios as possible without a hitch. Old VHDs created under Virtualbox and Hyper-V were mounted and operated normally, and vice-versa PCem-made VHDs mount just fine everywhere else. Great thanks to Sherman, Sarah, and everyone who was in...
by shermanp
Sat 09 Jun, 2018 8:45 pm
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] VHD support

(Hopefully) set the HDD type when the MFM controller is selected, and the user loads a VHD with one of the supported geometries. (Does this actually do anything elsewhere in PCem?) It's mainly a hint to the user when setting up machines. Some of the early MFM controllers only support a few hard dri...
by shermanp
Sat 09 Jun, 2018 9:32 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] VHD support

Patch has been updated again. Changes are: I did some more refactoring. No more malloc()... Added some checks to test for possible VHD footer corruption/issues. (Hopefully) set the HDD type when the MFM controller is selected, and the user loads a VHD with one of the supported geometries. (Does this...
by shermanp
Fri 08 Jun, 2018 12:05 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] VHD support

Large VHD image files should now work properly (cross fingers...). OP has updated patch.

Bit of a face-palm that one. I forgot to cast the file size calculations to large enough (64 bit) integers.
by shermanp
Thu 07 Jun, 2018 11:14 pm
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] VHD support

Great job on this patch. Issue I have is any vhd I create larger than 2048mb is not mountable under windows. I tried different sizes because the first one I tried was 4096mb and pcem worked fine. I installed Windows ME. When I tried mounting the vhd in windows it did not work. So I created smaller ...
by shermanp
Thu 07 Jun, 2018 9:04 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

A new patch has been posted, now with more VHD creation capabilities.
by shermanp
Thu 07 Jun, 2018 9:02 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] VHD support

Ok, I've updated my OP with a new patch, which now allows for creation of VHD's as well as opening them. With regards to my previous posts, I have implemented the VHD algorithm for calculating CHS in the size dialog when a VHD file is selected for creation. More specifically, the algorithm is used w...
by shermanp
Thu 07 Jun, 2018 2:40 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] Initial VHD support

For those who are interested, I ported the algorithm for both approaches to a python script and compared them. The script takes the size in MB, and calculates the geometry using the VHD method. It then uses the CHS output from the VHD method as the size parameter of the PCem method. Differing geomet...
by shermanp
Thu 07 Jun, 2018 1:38 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] Initial VHD support

I've noticed some differences in the way PCem and the VHD spec calculates disk geometry. PCem almost seems too specific, or not lenient enough. For example, a 100MB image (104,857,600 bytes) PCEM: Cyl: 203 Head: 16 SPT: 63 VHD : Cyl: 1003 Head: 12 SPT: 17 However, if one passes 104,761,344 bytes (10...
by shermanp
Wed 06 Jun, 2018 4:57 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] Initial VHD support

Looking at https://github.com/libLAS/libLAS-1.2/blob/master/include/liblas/guid.hpp I think the variant and version should be at offsets 6 and 8 rather than 7 and 9: guid[6] &= 0x0F; guid[6] |= 0x40; /* Type 4 */ guid[8] &= 0x3F; guid[8] |= 0x80; /* Variant 1 */ #endif } After reading the RFC, I th...
by shermanp
Tue 05 Jun, 2018 6:17 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] Initial VHD support

Thanks JohnElliott. I'll adapt that. I guess I should have mentioned that a string representation is not required. The raw bytes are saved directly to the footer. EDIT: Turns out Mingw-w64 doesn't include a definition for CoCreateGuid in its objbase.h for some reason (legacy MinGW does--go figure). ...
by shermanp
Mon 04 Jun, 2018 9:36 pm
Forum: Development
Topic: [COMPILE WARN/ERROR] String overflow error in pc.c
Replies: 2
Views: 160

Re: [COMPILE WARN/ERROR] String overflow error in pc.c

SarahWalker wrote:
Mon 04 Jun, 2018 7:06 pm
Fixed in rev 1183.
Thanks.
by shermanp
Mon 04 Jun, 2018 10:40 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

Re: [Patch] Initial VHD support

Yeah, looks like creating a variant 4 UUID should do the trick. Can be done with some random bytes and a bit of bit manipulation. No real need for cryptographic RNG for this purpose either, although it looks like arc4random from OpenBSD would do the trick if we did need it. I'll probably just stick ...
by shermanp
Mon 04 Jun, 2018 9:56 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

I've been thinking about VHD support for PCem for a while. Having never contributed any code to PCem before, it looked like adding VHD support wouldn't be too difficult, so I finally decided to have a go.
by shermanp
Mon 04 Jun, 2018 6:22 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

And initial VHD support has been implemented. See => viewtopic.php?f=4&t=3044
by shermanp
Mon 04 Jun, 2018 6:20 am
Forum: Patches
Topic: [Patch] VHD support
Replies: 15
Views: 585

[Patch] VHD support

After tearing my hair out figuring out wx-config.c , I have finally added initial VHD support to PCem. With this patch, PCem will be able to load VHD files. Only fixed VHD images are supported at this time, no dynamic or differencing image support. PCem cannot currently create VHD images. That will ...
by shermanp
Mon 04 Jun, 2018 5:39 am
Forum: Development
Topic: [COMPILE WARN/ERROR] String overflow error in pc.c
Replies: 2
Views: 160

[COMPILE WARN/ERROR] String overflow error in pc.c

My compiler (Mingw-w64 w/ GCC 7.1) has thrown up a string overflow error in the initpc function of pc.c . The problem occurs here: strncpy(discfns[0], argv[c+1], 260); The root cause is in ibm.h here: char discfns[2][256]; I have fixed it in my local environment, but I don't particularly want to com...
by shermanp
Fri 01 Jun, 2018 12:22 pm
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

That's alright, I've found a way of doing it using the method suggested here . Simple, and doesn't require compile time or run time checking. And since the only purpose is to read/write a one-time footer, performance is hardly an issue either. I think I've got the VHD footer reading working. The nex...
by shermanp
Thu 31 May, 2018 7:51 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

Sarah, is there an endian function floating around in PCem already (that doesn't rely on networking support)?

The VHD footer stores it's values in big endian, which I will need to handle in some manner.
by shermanp
Wed 30 May, 2018 10:47 am
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

Ugh... wx-config.c is not... pleasant.

Unfortunately, that seems to be the file one would need to modify to add VHD support. I shall see if I can figure out what needs to be added.
by shermanp
Tue 29 May, 2018 10:44 pm
Forum: General
Topic: VHD support
Replies: 35
Views: 5647

Re: VHD support

Sorry, there's always a huge number of other things that need doing, so this request keeps slipping. Does anyone else fancy implementing it? It shouldn't need any real knowledge of the emulator code - all the hard disc image code is abstracted into hdd_file.c so shouldn't need to touch much other c...
by shermanp
Sat 28 Apr, 2018 4:44 am
Forum: Development
Topic: [Request] Additional Sidewinder Device(s)
Replies: 3
Views: 316

Re: [Request] Additional Sidewinder Device(s)

I've been doing some more reading, and it looks like the Precision Pro is likely the easiest candidate to add. Unlike the 3D Pro, there's no pesky analog mode emulation to have to worry about (apparently it's quite the dance getting the stick in and out of digital mode). And unlike the Game Pad, the...
by shermanp
Thu 26 Apr, 2018 8:22 pm
Forum: Development
Topic: [Request] Additional Sidewinder Device(s)
Replies: 3
Views: 316

Re: [Request] Additional Sidewinder Device(s)

More joysticks in general would be interesting, though only a few resemble the common DS3/X360 pad. Closest I can think that does in the emulated period is the SV262 and that's not a sidewinder so it's O/T :(. Yeah, not really after a something that can emulate a modern gamepad. More just wanting t...
by shermanp
Thu 26 Apr, 2018 7:20 am
Forum: Development
Topic: [Request] Additional Sidewinder Device(s)
Replies: 3
Views: 316

[Request] Additional Sidewinder Device(s)

Hi all I was wondering if anybody would be interested in adding support for MS Sidewinder joysticks such as 3D Pro and/or Precision Pro. PCem already supports the SW gamepad, and from the limited reading I've done (skimmed the Linux driver and Patent US5628686 ) the protocol is the same or similar f...
by shermanp
Sat 24 Feb, 2018 8:23 pm
Forum: Development
Topic: Possible to get ALT+TAB trapped properly?
Replies: 5
Views: 696

Re: Possible to get ALT+TAB trapped properly?

My memory is a bit vague, but I think I remember discussions about input being handled by SDL2. Maybe try looking there?
by shermanp
Tue 13 Feb, 2018 11:32 pm
Forum: Development
Topic: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)
Replies: 30
Views: 4466

Re: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)

Well, I still have the problem with SB16, perhaps am I using some wrong dll? corrupt MSYS2 environment? somewhat missing? :roll: Could anyone with a successful compilation under MSYS2 upload somewhere its pcem.exe + all dll files please? even the full src folder with the good Makefile will be usefu...
by shermanp
Tue 13 Feb, 2018 10:44 pm
Forum: Development
Topic: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)
Replies: 30
Views: 4466

Re: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)

These instructions are in an incorrect order: $ ./configure --enable-networking --enable-release-build $ autoreconf $ mingw32-make -j autoreconf (preferably with the -i parameter), comes before the ./configure line, as basically autoreconf will regenerate the configure script. And this is incorrect...
by shermanp
Tue 13 Feb, 2018 9:15 pm
Forum: General
Topic: 430/VX with AWE32 crashes emulator on start
Replies: 11
Views: 845

Re: 430/VX with AWE32 crashes emulator on start

This looks like it could be an MSYS2 problem. Or maybe the specific libraries used. I did a fresh recompile with MSYS2, and got the same problem. (Crashes with SB16, but doesn't with no sound card) I then dusted off my TDM-GCC-32 installation and compiled PCem. It starts without any issue at all, us...
by shermanp
Tue 13 Feb, 2018 8:52 pm
Forum: Development
Topic: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)
Replies: 30
Views: 4466

Re: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)

It turns out that base-devel is what's required for autoreconf. I have updated the guide for this.

And it turns out when I did a fresh compilation from scratch, it broke PCem, like ruben_balea is having.