Page 1 of 1

img building?

Posted: Tue Oct 18, 2011 4:40 am
by resin
I've set up jDosbox on my site and it works a charm. What I want to do now is compile some of my own DOS games into img files, to be played on the site. I've tried making img files with WinImage (choosing "save as .ima" but actually saving the file with .img extension, which was suggested on another site) with format being 1.44 MB, but game didn't load.. I also attempted to make img with the DOSBox Megabuild, but couldn't figure out how to actually add files to the image before creating it.. Please can someone explain how to create a img file to be played with jDosbox? Here's my test site, all I see is the java being loaded for a second, and then just goes to plain black window.. http://resin.webs.com/testscroll.html

Thank you

Re: img building?

Posted: Tue Oct 18, 2011 9:00 am
by gumby
Here are the steps that I took (there may be other, easier ways - Collector?):

1. Download Bochs & use the Disk Image Creation Tool - I created 10 meg images
2. Crank up the image in Bochs and fdisk then format it
3. I then used DiskExplorer found referenced in the IMGMOUNT page in the DOSBox pages http://www.dosbox.com/wiki/TOOLS:Disk_Explorer - use the 'Manual HD image' option & then the 'ATFormat' to open the image. Drag'n'drop your files into your image & you are done.

Re: img building?

Posted: Tue Oct 18, 2011 12:33 pm
by Collector
Don't use WinImage to create the images, but you can use it to inject the contents into the image.

Re: img building?

Posted: Tue Oct 18, 2011 11:35 pm
by resin
Ok I created a 10mb image with the Bochs Disk Image Creation Tool. I then went to load Bochs and a start menu appears with a list of edit options. I didn't choose any and just clicked Start, and then it told me there is no bootable device and wouldn't let me go on. So how exactly do I accomplish step 2?

Collector, I did try injecting files into an image created with the DOSBox Megabuild but still didn't work. Maybe there's an extra step I needed to take?

I've never used any of these image creation programs before, so please bare with me. Thanks

Re: img building?

Posted: Wed Oct 19, 2011 8:59 am
by gumby
Check section 8.1.2 of the docs: http://bochs.sourceforge.net/doc/docboo ... howto.html - I think I used the FreeDOS option.

Re: img building?

Posted: Wed Oct 19, 2011 1:41 pm
by Collector
You will need to have a bootable VM to prepare the disk. It has been a while, but I think you need to fdisk and format the image before you can inject any files.

Re: img building?

Posted: Thu Oct 20, 2011 11:23 am
by resin
Yay I did it! Thanks. Just one last thing.. How do I load the game with a custom conf? Normally I have the custom conf inside the game's folder, but since the img is being mounted after loading DOSBox jar, this can't work? What do I need to do?

Re: img building?

Posted: Thu Oct 20, 2011 2:27 pm
by Collector
There should be information on that in the jDOSBox documentation.

Re: img building?

Posted: Thu Oct 20, 2011 2:39 pm
by resin
I figured it out thanks. Could you check my link above and tell me if its running ok for you?

Re: img building?

Posted: Thu Oct 20, 2011 5:39 pm
by Collector
It works, but if you put your image in a jar the image will be a fraction of the download size. For small DOS games there is a lot of empty space in the hard drive image that will compress down to next to nothing and you can mount the jar instead of the image directly.

Re: img building?

Posted: Thu Oct 20, 2011 9:27 pm
by resin
I'm not sure I understand you. The img is inside a jar, and its size is about 96k. From what I understood, the game has to be compiled into a img, and the image be placed in a jar. Are you saying I could just place the game files directly into a jar and mount that, and do without the img entirely?

Re: img building?

Posted: Thu Oct 20, 2011 10:27 pm
by Collector
I didn't look at your code. It just seemed like it took longer to load than it should have. I had assumed that it was due to a large download, but perhaps the server was just slow at the time.