Search found 70 matches

by shermanp
Thu 12 Jul, 2018 9:39 pm
Forum: General
Topic: CD rom images will not load and freeze the GUI
Replies: 9
Views: 677

Re: CD rom images will not load and freeze the GUI

Have you tried creating a new config? There may be some issue with the current config file you're using that's causing a problem.

I am unable to reproduce the issue here. CD images load just fine for me.
by shermanp
Wed 11 Jul, 2018 5:16 am
Forum: General
Topic: Few newbie questions
Replies: 9
Views: 450

Re: Few newbie questions

Go to Video, Render Driver and put it from Auto to OpenGL 3.0. It makes my machines work faster. It was on D3D already. OGL just displays ~999 FPS instead, but the emualtion percentage remains the same (below 100%). At desktop, just standing there, can0t hit 100%. My own CPU is barely used, ~30%. I...
by shermanp
Mon 09 Jul, 2018 5:34 am
Forum: General
Topic: VHD support
Replies: 44
Views: 6303

Re: VHD support

In case anyone in this thread missed it, I have updated my patch in the patches subforum to add support for dynamic VHD's
by shermanp
Mon 09 Jul, 2018 5:29 am
Forum: Patches
Topic: [Patch] New VHD support... now with added dynamics
Replies: 1
Views: 322

Re: [Patch] New VHD support... now with added dynamics

MAJOR REFACTOR I decided that projects other than PCem may find my VHD code useful. To that end, I've disentangled the VHD code from the PCem code as much as possible. I am now calling this implementation MiniVHD , or Minimalist VHD. The code is available at https://github.com/shermp/MiniVHD , relea...
by shermanp
Fri 29 Jun, 2018 6:57 am
Forum: Patches
Topic: [Patch] New VHD support... now with added dynamics
Replies: 1
Views: 322

[Patch] New VHD support... now with added dynamics

EDIT 2018-07-09: Updated patch available with post #2 Hi all, I wanted to see if I could extend myself, and implement sparse, or dynamic VHD support to PCem. I am happy to announce that I appear to have succeeded. This patch replaces my earlier VHD patch, which I consider depreciated (I'll edit the...
by shermanp
Thu 28 Jun, 2018 2:50 am
Forum: General
Topic: VHD support
Replies: 44
Views: 6303

Re: VHD support

So I decided to run ATTO under Windows 98. I don't know how representative it is etc etc, but it hopefully gives some indication of any performance differences between fixed and dynamic disks. The setup was as follows: All disk images are stored on my Crucial MX100 512GB SSD. The guest OS (Windows 9...
by shermanp
Wed 27 Jun, 2018 9:30 pm
Forum: General
Topic: VHD support
Replies: 44
Views: 6303

Re: VHD support

But OS in VirtualBox works faster if it has Fixed size. Does that mean PCem will lose some of it's performance when having Dynamically allocated hard disk? Yes, potentially. But I don't think there will be too much in it. The format stores data in (typically) 2MB blocks. When a read or write occurs...
by shermanp
Wed 27 Jun, 2018 12:02 pm
Forum: General
Topic: VHD support
Replies: 44
Views: 6303

Re: VHD support

Coming soon to a PCem near you! (Hopefully... If I don't stuff anything ELSE up...) DynamicVHD.PNG Oh, and BTW, the VHD file was created by PCem, and Windows 10 mounts it as well. Up next will be to release a patch in the next day or two, where I can hopefully get some victims—er—"kind volunteers" t...
by shermanp
Sat 23 Jun, 2018 7:28 am
Forum: General
Topic: VHD support
Replies: 44
Views: 6303

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: 44
Views: 6303

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: 44
Views: 6303

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: 213

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

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: 44
Views: 6303

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: 44
Views: 6303

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: [Depreciated][Patch] VHD support
Replies: 15
Views: 722

[Depreciated][Patch] VHD support

2018-06-29: I consider this patch DEPRECIATED. I have now added a lot more functionality, including dynamic VHD support. I created a new topic for the patch, available here: http://pcem-emulator.co.uk/phpBB3/viewtopic.php?f=4&t=3056 After tearing my hair out figuring out wx-config.c , I have finall...
by shermanp
Mon 04 Jun, 2018 5:39 am
Forum: Development
Topic: [COMPILE WARN/ERROR] String overflow error in pc.c
Replies: 2
Views: 213

[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: 44
Views: 6303

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: 44
Views: 6303

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: 44
Views: 6303

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: 44
Views: 6303

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...