Basilisk II PSP Port (Mac Emulator)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Wally4000 wrote: Could you possibly allow basilisk 2 to make the hardfile folder on the fly?

Wally
Yeah, no problem. I should probably do that with all the folders.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

J.F. wrote:
Wally4000 wrote: Could you possibly allow basilisk 2 to make the hardfile folder on the fly?

Wally
Yeah, no problem. I should probably do that with all the folders.
Oh right now im trying to work the floppy disk out and boot to Mac OS 7.0.1

There isnt a boot from floppy option in the menu :/

Im using the disk image from the Apple website renamed to .dsk (works fine in Mini Vmac)

Its being a pain on basilisk 2 though :P

Wally
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

What is it doing? Is it putting an X on the boot display (mac side)? I was able to boot the ubiquitous Network Access floppy just fine. Make sure the floppy doesn't have a header on it. I had to strip the header off the NA floppy before it would boot. B2 expects floppies to be straight data. A high-density disk should be exactly 1474560 bytes long.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

J.F. wrote:What is it doing? Is it putting an X on the boot display (mac side)? I was able to boot the ubiquitous Network Access floppy just fine. Make sure the floppy doesn't have a header on it. I had to strip the header off the NA floppy before it would boot. B2 expects floppies to be straight data. A high-density disk should be exactly 1474560 bytes long.
just a question mark mate nothing more :(

Wally
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

You get an X for a few flashes when something isn't bootable. You get ? when there's nothing in the drive. If you select a floppy in the GUI, it's ALWAYS inserted currently, so you SHOULD get X or the Happy Mac depending on the boot status. Oh well, I'll look into it... I'm currently installing 8.1 on my Slim. I'm trying to get enough in place to check networking... I just added the code to connect to the selected access point (the rest of the network code was already in place). It used to hang right before the desktop when you enabled the udp tunnel (because the network wasn't connected). Now it goes right through, so it's at least getting that far.

By the way - I don't know which OS versions B2 supports exactly. I need to clean up the graphics so I can read things. :) My 8.1 CD seems to work rather well. I don't remember what the Network floppy is, and I can't read the "About this Mac" window. :D
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

J.F. wrote:You get an X for a few flashes when something isn't bootable. You get ? when there's nothing in the drive. If you select a floppy in the GUI, it's ALWAYS inserted currently, so you SHOULD get X or the Happy Mac depending on the boot status. Oh well, I'll look into it... I'm currently installing 8.1 on my Slim. I'm trying to get enough in place to check networking... I just added the code to connect to the selected access point (the rest of the network code was already in place). It used to hang right before the desktop when you enabled the udp tunnel (because the network wasn't connected). Now it goes right through, so it's at least getting that far.

By the way - I don't know which OS versions B2 supports exactly. I need to clean up the graphics so I can read things. :) My 8.1 CD seems to work rather well. I don't remember what the Network floppy is, and I can't read the "About this Mac" window. :D
oohh i didnt see that bit down the bottom there, i thought that was what was mounted already..

lemme try again :D
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

So how do we strip the header from a file in Mac OS X / Windows then ;)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Wally4000 wrote:So how do we strip the header from a file in Mac OS X / Windows then ;)
Just load the file in a hex editor and delete the bytes that are part of the header.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

J.F. wrote:
Wally4000 wrote:So how do we strip the header from a file in Mac OS X / Windows then ;)
Just load the file in a hex editor and delete the bytes that are part of the header.
Would be nicer if you Pmed me a link with the fixed file :)

I keep stuffing up :P

Wally
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

thanks J.F. for updating.
This ROM was from an old Mac my father had, I don't remember which.
I will get a new Mac in a few months :)

Maybe I can find a compatible ROM "somewhere".
So we need to remove the header from the file?
Image
Upgrade your PSP
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

B2 doesn't like headers on NOTHING! If there's a header, forget about it. :)
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

hmmm ok :P
Image
Upgrade your PSP
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Actually, I think hardfiles can have a header, but they seem to be the only thing like that.

Here's test 3. Even more stuff - the CPU frequency is set by the prefs, and networking should be working (it's just impossible to set the network settings on the Mac side since there's no keyboard). The cdrom and floppy are removable now... but that led me to a weird quirk I'm not sure is due to B2 or not.

When you have the floppy and cdrom set as removable devices (and not just missing when not in use), sometimes the Mac video "stops" - you get the initial dither pattern and nothing else, even though the Mac is still running in the background. As long as you have a bootable hardfile, bootable cdrom, or the combination of a non-bootable hardfile AND a bootable floppy, the video doesn't go out to lunch. So no trying to boot just a floppy. Weird, huh?

binary
source

Uh... to insert media, press SELECT. You'll get a field that shows a floppy or cdrom. Press left/right to switch between floppies and cdroms. Press up/down to scroll through the list of floppies or cdroms. When you reach the disk you want, press X to mount it. Note that you must not have a disk inserted in that device or you won't be able to mount it. So if you already have a cdrom inserted, you have to eject it before you can insert the next. Same for the floppy. Only cdroms and floppies in their respective directories will show. You don't get to navigate willy-nilly to select cdroms/floppies on the desktop.
User avatar
dennis96411
Posts: 70
Joined: Sun Jul 06, 2008 4:59 am

Post by dennis96411 »

Hey, umm... How do I use it? I put the EBOOT in the BasiliskIIPSP folder in my GAME folder, along with all other mac files that I use with Chaosknight's BasiliskIIPSP before. It says Basilisk II Error Cannot open ROM file. I put the rom in the same place as the folder. Help, I really want to try it out, it looks very cool.
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

dennis96411, you put MAC.ROM in the "roms" folder inside the folder where you put the eboot, and your .dsk files in the "hardfiles" folder. Then you have to go through the settings to input the paths of these files.

Woohoo, I just got it working with test3, though it seems to be very slow compared to the version that was originally posted in this thread. Thanks for the regular updates.
User avatar
dennis96411
Posts: 70
Joined: Sun Jul 06, 2008 4:59 am

Post by dennis96411 »

I thought you're suppose to put your dsk files in disk folder, and hfv files in hardfiles folder.
lex23
Posts: 2
Joined: Sun Jul 06, 2008 8:24 am

Post by lex23 »

i've got 7.5.5 working.. but i have also mac os 8.img file...but i can''t install 8.. can you help me?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

lex23 wrote:i've got 7.5.5 working.. but i have also mac os 8.img file...but i can''t install 8.. can you help me?
What problem are you having? Does it not boot? I suppose it's a CD. I was able to boot my 8.1 CD image and install to a hardfile last night.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

This is working fantastic!
256 colors works really well and tidies the screen up a bit.

I thought nah no sound would be implemented (recalls TheLazyOne saying something about frequencys that the PSP doesn't support) but i tried the sound control panel and heard the beep and went whoa and nearly fell off my chair.


I played Solitaire until dawn last night, it worked like a chump, played with the puzzle. Will install 8.1 eventually.

I tried playing Oxyd Magnum but the PSP got a bus error for some reason :/

Oh and when i was in the sound control panel the sounds were all "Simple Beep" however when i double clicked a sound in the System file they worked fine.. Not sure if its a bug but yeah.

Thanks so much for the hard work on this, its much appreciated!

I'll get nailed down on my website now, and focus on the mouse based games.. There's plenty of em, a lot of 3D ones to be shuffled through (thats right, DOS couldn't handle 3D very well chumps but the tiny little mac could!)

Wally

P.S You might wanna fix up that bootable disk image issue where it wants the header stripped.. People are going to get stumped like me over it.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Wally4000 wrote:This is working fantastic!
256 colors works really well and tidies the screen up a bit.
Yeah, the stretch blit for 4 bit mode is goofed up, but I don't see offhand what the problem is.
I thought nah no sound would be implemented (recalls TheLazyOne saying something about frequencys that the PSP doesn't support) but i tried the sound control panel and heard the beep and went whoa and nearly fell off my chair.
It's VERY basic sound at the moment - only the simple beep seems to work. I expected as much as the buffer filling code is just a placeholder until I get around to it.

I played Solitaire until dawn last night, it worked like a chump, played with the puzzle. Will install 8.1 eventually.

I tried playing Oxyd Magnum but the PSP got a bus error for some reason :/

Oh and when i was in the sound control panel the sounds were all "Simple Beep" however when i double clicked a sound in the System file they worked fine.. Not sure if its a bug but yeah.
Again the sound isn't "complete". Not to mention, B2 only does Sound Manager sound, not Sound Driver sound, and certainly not direct sound. I already knew some programs (games) would have problems because of that. I plan to add Sound Driver and direct sound to B2 eventually.
Thanks so much for the hard work on this, its much appreciated!
Still has a ways to go, but now that I have it compiling and running, you can actually see the work as it progresses. :) Up to this point, no one sees anything, so they get frustrated because there doesn't seem to be any progress.
I'll get nailed down on my website now, and focus on the mouse based games.. There's plenty of em, a lot of 3D ones to be shuffled through (thats right, DOS couldn't handle 3D very well chumps but the tiny little mac could!)
Be sure to post the results. Some things will probably all be the same problem (like trying to use Sound Driver sound), but others will be different and allow for more debugging.
P.S You might wanna fix up that bootable disk image issue where it wants the header stripped.. People are going to get stumped like me over it.
:)

Yeah, I'll add header handling on the floppy and rom since those will be the two biggest issues with that.

If anyone wishes to help, I do publish the source with each test release (hint - hint). Areas to look at include why the friggin' timing doesn't work, and why the clock doesn't have close to the proper time. I switch from using B2's normal 60 Hz code to just waiting on the vblank because of the issue with the timing. I'll look at it later if no one else does in the meantime.

I'll have another post later this evening. Major hacks include a hack to keep the emu from crashing when switching screenmodes. The current version up sometimes switches, and sometimes hangs. I haven't the slightest idea why, but found a hack that prevents the hangs.
User avatar
dennis96411
Posts: 70
Joined: Sun Jul 06, 2008 4:59 am

Post by dennis96411 »

Hey umm how do I install Mac OS 8 with the img? I mounted as the CD but I don't know how to install it. Oh, J.F. can you add multi-floppy support? And when you have a cd img, mount it so it would be on the desktop just like dsk and hfv files. Lol, just an idea, though you don't have to do it.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

The clock is 2 hours fast, I dare say it would be due to timezone differences.

Wally
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

dennis96411 wrote:Hey umm how do I install Mac OS 8 with the img? I mounted as the CD but I don't know how to install it. Oh, J.F. can you add multi-floppy support? And when you have a cd img, mount it so it would be on the desktop just like dsk and hfv files. Lol, just an idea, though you don't have to do it.
It probably wouldn't be too much work for more than one floppy, but why? There's no reason to constantly use one when a hardfile would be more suitable. Floppies are just for small transfers and initial installs. Not to mention how easy it is to change floppies, there's little need to have two (or more) at once.

Yes, that 4 bit mode it defaults to is very hard to read. I was able to install OS 8 because I'm fairly familiar with it, so i could get by with the crappy text. :) Basically, the installer is the app in the top left of the window. Just click okay or continue until it's done, then you'll have the control panels so you can switch to 8 bit mode. It's that or wait until we figure out why 4 bit doesn't render right.

As far as that goes, the colors are right, and the graphics are mostly right. It's like there's some kind of dithering going on, and I don't know what is making it do that. If I didn't know better, I'd say every other line is off, but the widths and mods seem good that I can tell.
User avatar
dennis96411
Posts: 70
Joined: Sun Jul 06, 2008 4:59 am

Post by dennis96411 »

Well if you can't add multi-floppy support how do I convert it to hfv files? I've got a Mac HDD.DSK that's about 30 MB.
siulmagic
Posts: 42
Joined: Sun Jul 06, 2008 1:50 pm

Post by siulmagic »

im having a problem installing from a cdrom, iv selected to boot from cdrom
also configured the disk and were to look for the rom and selected it

but when i boot it displays a floppy disk with a question on the middle and the memory sticks keeps reading something i dont know what it is plz help much appreciate it thx

keep up the good work J.F
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

dennis96411 wrote:Well if you can't add multi-floppy support how do I convert it to hfv files? I've got a Mac HDD.DSK that's about 30 MB.
There are no (Mac) floppies larger than 1.44M. That's a hardfile. Just change the extension to hfv like it should be.

If you have a set of install floppies, you insert them when the installer tells you to. You run the first, and when it needs the next it ejects the current floppy and asks for the next.

I know the 68K Mac is old, but it's not rocket science. It's not as hard to do all this as some folks seem to be trying to make it. :)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

siulmagic wrote:im having a problem installing from a cdrom, iv selected to boot from cdrom
also configured the disk and were to look for the rom and selected it

but when i boot it displays a floppy disk with a question on the middle and the memory sticks keeps reading something i dont know what it is plz help much appreciate it thx

keep up the good work J.F
Sounds like you have the emulator set up right - that's the "Please insert something bootable" prompt. Are you sure the cdrom you made the image from is bootable? Did you put it in the cdroms directory? How did you rip it?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Okay, here's test4. This one doesn't hang when switching display modes. You'll want to run in 8 bit mode for right now. 640x480 is nice, but if you have bad eyes, 512x384 would be easier to read. Don't try to use 768x576 right yet as it's too tall for the current refresh routines. Also includes other minor updates, but I forget what beyond the video hack.

binary
source
siulmagic
Posts: 42
Joined: Sun Jul 06, 2008 1:50 pm

Post by siulmagic »

hmm my text is unreadable i got in 8 bit mode 640x480 60hz
using mac os 7.5

edit btw no matter what color deph it always looks black and white with every version iv tested

edit2: ok nvm i had to change setting inside mac in order to make it readable all is good now =D
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

Oh wow, just installed 8.1... works a charm :D
Could you add a button to accelerate the mouse movement?

edit: Meh, in fact I will if I can get it to compile.

edit 2: Wow, that was painful. xD Finally got it to compile then I ended up with an 80020148 error, probably because of the stuff I had to comment out. I really need to update my SDK.

edit 3: Installed the win32 SDK from http://forums.ps2dev.org/viewtopic.php?t=9812, and copied over the 4.01 M33-2 SDK. Now it compiles fine until the end, where I get the error
main_psp.cpp:(.text+0x11dc): undefined reference to `kuKernelGetModel()'
which makes no sense as -lpspkubridge is in the makefile, and in the libs directory. kuKernelGetModel is present inside it. :/
Post Reply