I did that initially and had a lot of problems with the mouse being too sensitive, so I locked it down. I'll revisit it onc I get some other more important things working (proper color, ethernet, os 8)sHARD>> wrote:To solve the mouse problem why not utilize the analog sensitivity to accelerate the mouse? I know at least one homebrew already did, I'll see if I can dig up the code to take a look at.
Basilisk II PSP Port (Mac Emulator)
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
w00t
Cool, if you don't mind and I find the time, I might have a look myself.ChaosKnight wrote:I did that initially and had a lot of problems with the mouse being too sensitive, so I locked it down. I'll revisit it onc I get some other more important things working (proper color, ethernet, os 8)sHARD>> wrote:To solve the mouse problem why not utilize the analog sensitivity to accelerate the mouse? I know at least one homebrew already did, I'll see if I can dig up the code to take a look at.
ChaosKnight wrote:I actually kinda like it this way for Basilisk. The screen isn't that big anyway, you get around pretty fast. But maybe you can add in a configurable accellerator later on. Don't think it's a very important issue though - it works very well now. Getting the analog sensitivity just right is very hard.sHARD>> wrote:To solve the mouse problem why not utilize the analog sensitivity to accelerate the mouse? I know at least one homebrew already did
The controller seems sensitive near the centre, so I believe the best solution involves a cubic spline. SDL's joystick code does this and the values are currently something like this:Arwin wrote:Getting the analog sensitivity just right is very hard.
Code: Select all
// 4 points define the bezier-curve.
static point a = { 0, 0 };
static point b = { 50, 0 };
static point c = { 78, 32767 };
static point d = { 128, 32767 };
Although with something like Basilisk, perhaps it would be better to use d-pad for the cursor and use the analog stick somehow for keyboard input.
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
I don't quite understand this code. The values you get from the analog pad are 0-255 with 128 being the center. How are you scaling to get 32767?rinco wrote:Code: Select all
// 4 points define the bezier-curve. static point a = { 0, 0 }; static point b = { 50, 0 }; static point c = { 78, 32767 }; static point d = { 128, 32767 };
I was think about using the p-sprint code and just using select to switch input modes (while still retaining the analog pad for mouse movement) Dunno. I'm open to suggestion.[/quote]rinco wrote:Although with something like Basilisk, perhaps it would be better to use d-pad for the cursor and use the analog stick somehow for keyboard input.
w00t
Those values are the x/y coordinates that can be plugged into any cubic spline routine. Here is a link to an appet which can help visualise the curve created by the 4 points (the initial curve is nothing like the values I posted - you will have to move the points around): http://www.saltire.com/applets/advanced ... spline.htm
The values are only calculated to 128 because the negative of an axis is calculated by changing the sign of a value calculated on the positive (so 128 sample points). SDL_sysjoystick.c has the code that you can pluck if you wish to calculate the curve, and cache into an array during initialisation.
I'd like to see a solution with both mouse and keyboard, as one button for the mouse is the same cost as one button to switch between mouse and keyboard.
The values are only calculated to 128 because the negative of an axis is calculated by changing the sign of a value calculated on the positive (so 128 sample points). SDL_sysjoystick.c has the code that you can pluck if you wish to calculate the curve, and cache into an array during initialisation.
I'd like to see a solution with both mouse and keyboard, as one button for the mouse is the same cost as one button to switch between mouse and keyboard.
-
- Posts: 5
- Joined: Thu Oct 13, 2005 5:04 am
- Location: USA,VA
- Contact:
Hello wanted to give my praise. Right now looking at the OS8.1 support, just talked to Chaos who said next release should hold the model ID to help support that correctly.
I use this on my PC, and well, trying to see how well my PC disk image will port to the PSP.
Rather use my .hfv file I had on my PC and port it to the PSP which is what I am trying for. Cause yes, it had netscape and more.
Also I should point out that this emu will NOT support PPC right now. (Mac OSX and hell.. even 8.2 I think)
If it DID support it ever.. we could play Warcraft 1, 2, and Diablo! =D
Anyways Im here as well to offer my support on things. =) Got mine working fine, just once that model ID changes, Ill be able to run the OS8 without it giving me a model not supported issue atm. Which unless I compile the source myself I am at a dead end. =/
I would like to know the prefered boot order however. I mean cause if I look at it, system.dsk will always be 1st to load. But what if I wanted to have the .hfv file to load 1st cause that would mean it boots from the HD file which holds the OS, vs the system disk file which is only 7.5.5
I use this on my PC, and well, trying to see how well my PC disk image will port to the PSP.
Rather use my .hfv file I had on my PC and port it to the PSP which is what I am trying for. Cause yes, it had netscape and more.
Also I should point out that this emu will NOT support PPC right now. (Mac OSX and hell.. even 8.2 I think)
If it DID support it ever.. we could play Warcraft 1, 2, and Diablo! =D
Anyways Im here as well to offer my support on things. =) Got mine working fine, just once that model ID changes, Ill be able to run the OS8 without it giving me a model not supported issue atm. Which unless I compile the source myself I am at a dead end. =/
I would like to know the prefered boot order however. I mean cause if I look at it, system.dsk will always be 1st to load. But what if I wanted to have the .hfv file to load 1st cause that would mean it boots from the HD file which holds the OS, vs the system disk file which is only 7.5.5
~Battlez-avec la Mystique?~
...
...i got EVERYTHING working... now im trying to figure out how to get Oregon Trail to work... im clueless! I already got the rom... 'otrail.bin' (1 and 2) tried to figure out hvfexplorer... but this is my first time really experiencing MAC OS... since about 3/4th grade... im in college now... if anyone could PLEASE help, you would rock!
thanks...
...eco
thanks...
...eco
PSPuccyEatern
Folks, a little reminder here:
Specifically for the two posts above this one. ;)ChaosKnight wrote:This is off-topic (devlopment only) so in the future please post any support related questions on the Animezilla Basilisk II PSP forum here: http://forum.animezilla.net/Default.aspx?g=posts&m=4
-
- Posts: 1
- Joined: Thu Oct 13, 2005 9:05 am
Have you had a chance to fix up the video colours yet? If not I did some looking at RGB values. I didn't have much to work on, however, by looking at the apple logo top left it appears that the red field and the blue one need to be swapped. Green is in the correct place.
From top to bottom, the colours of the apple logo you have:
Green (0,255,0)
Cyan (0,255,255)
Blue (0,0,255)
Purple? (255,0,255)
Red? (255,0,0)
Swapping the two fields would yield something like this:
Green (0,255,0)
Yellow (255,0,0)
Red (255,0,0)
Purple (255,0,255)
Blue (0,0,255)
Which would resemble the apple logo much better.
Also the USA flag would look about right.
Gray would remain gray, white would remain white and black will remain black.
Is it possible that you have an array that is being indexed backwards?
Nice work with this emulator can't wait to see some more features added in :) It's making me want to go and replace my stock 32MB stick already =D (I've had my PSP 4 days now)
From top to bottom, the colours of the apple logo you have:
Green (0,255,0)
Cyan (0,255,255)
Blue (0,0,255)
Purple? (255,0,255)
Red? (255,0,0)
Swapping the two fields would yield something like this:
Green (0,255,0)
Yellow (255,0,0)
Red (255,0,0)
Purple (255,0,255)
Blue (0,0,255)
Which would resemble the apple logo much better.
Also the USA flag would look about right.
Gray would remain gray, white would remain white and black will remain black.
Is it possible that you have an array that is being indexed backwards?
Nice work with this emulator can't wait to see some more features added in :) It's making me want to go and replace my stock 32MB stick already =D (I've had my PSP 4 days now)
For a really quick test, I tried this ... no keycode translation yet, but I noticed some values are probably the same (F keys notably) and once it works, I can translate easily enough. Can't get it to work yet though, my problem is probably with CPP projects, with which I have no experience.
I added an include to my p_sprint.h (if you try this, be sure to get the 63a version of the include, as the older versions reset the pad so don't work well if you also do that yourself already), then modified the following bit of code (very slightly as you can see):
Finally I added p_sprint.o in the Makefile like so:
But I get an error "undefined reference to p_spReadKeyEx(p_sp_Key*,unsigned int)
Can anyone point out the probably obvious error here?
Thanks!
I added an include to my p_sprint.h (if you try this, be sure to get the 63a version of the include, as the older versions reset the pad so don't work well if you also do that yourself already), then modified the following bit of code (very slightly as you can see):
Code: Select all
struct p_sp_Key myKey;
int Psp60HzTimer(SceSize args, void *argp)
{
while (true)
{
// Wait another 60Hz.
sceKernelDelayThread(16625);
// Read input
sceCtrlReadBufferPositive(&pad, 1);
// Setup analog dead zone and read "mouse"
if (pad.Lx > 108 && pad.Lx < 148) pad.Lx = LastX = 128;
else
{
if (pad.Lx > 127) ADBMouseMoved( 2, 0);
if (pad.Lx < 127) ADBMouseMoved(-2, 0);
}
if (pad.Ly > 108 && pad.Ly < 148) pad.Ly = LastY = 128;
else
{
if (pad.Ly > 127) ADBMouseMoved(0, 2);
if (pad.Ly < 127) ADBMouseMoved(0, -2);
}
if (pad.Buttons != 0)
{
if (pad.Buttons & PSP_CTRL_RTRIGGER)
{
ADBMouseDown(0);
MouseDown = true;
}
else if ((pad.Buttons & PSP_CTRL_RTRIGGER) && MouseDown)
{
ADBMouseUp(0);
MouseDown = false;
}
if (pad.Buttons & PSP_CTRL_START)
{
ADBKeyDown(0x24);
EnterPressed = true;
}
else if ((pad.Buttons & PSP_CTRL_START) && EnterPressed)
{
ADBKeyUp(0x24);
EnterPressed = false;
}
}
else
{
// Reset anything set.
if (MouseDown) { ADBMouseUp(0); MouseDown = false; }
if (EnterPressed) { ADBKeyUp(0x24); EnterPressed = false; }
}
//release previous key
if(myKey.keycode>0)
{
ADBKeyUp(myKey.keycode);
}
//read current key
p_spReadKeyEx(&myKey,pad.Buttons);
//press current key
if(myKey.keycode>0)
{
ADBKeyDown(myKey.keycode);
}
// Trigger 60Hz interrupt.
SetInterruptFlag(INTFLAG_60HZ);
TriggerInterrupt();
}
}
Code: Select all
OBJS = ../main.o p_sprint.o main_psp.o ../prefs.o prefs_psp.o \
prefs_editor_psp.o sys_psp.o ../rom_patches.o \
../slot_rom.o ../rsrc_patches.o ../emul_op.o \
../macos_util.o ../xpram.o xpram_psp.o ../timer.o \
timer_psp.o clip_psp.o ../adb.o ../serial.o \
serial_psp.o ../ether.o ether_psp.o ../sony.o ../disk.o \
../cdrom.o ../scsi.o scsi_psp.o ../video.o video_psp.o \
../audio.o audio_psp.o \
../user_strings.o user_strings_psp.o \
Can anyone point out the probably obvious error here?
Thanks!
Re: Can OS 8 work
It won't until he fixes some stuff. It currently states that you have an incompatable model. The problem may be as simple as adding more models to the supported list, or the emu could have some other issues. I guess we shall see.pspaddict wrote:Hey has any1 confirmed that Mac OS 8.0 works. Please Tell
-
- Posts: 5
- Joined: Thu Oct 13, 2005 5:04 am
- Location: USA,VA
- Contact:
1) That means I need to go setup this thing to compile it myself :PMysticales wrote:I already talked that over with Chaos, it was a simple Model ID setting which he fixed, he changed it to Model 14. That should be all we need to support 8.0, Long as you had a good rom file to go with it. Not the LC III.
Next release he said will include his fix.
2) You live in VA too?
OS8
Anyway what rom do you need to get OS8 to work. I tried doing a normal boot disk... finder/system. Just tell me what rom I need. I have a Powerbook 180c(OS7) , Powerbook 540c (OS8). Also how do you make the fix.. can some1 host a file so i can use OS8 cuz i have the cd
PSPADDICTED :):)
-
- Posts: 5
- Joined: Thu Oct 13, 2005 5:04 am
- Location: USA,VA
- Contact:
8.0 WONT work in "This' release, due to that when it was compiled, it was compiled using a model ID that didnt support OS8, Think Chaos used the LC III ID, Not the Quadra. Which is fixed in next release.
Yes I live in VA, Beach.
Once this model is fixed, then 8.0 should work.
Yes I live in VA, Beach.
Once this model is fixed, then 8.0 should work.
~Battlez-avec la Mystique?~
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
Ok, there's been a lot of talk about the model issue and OS8 and such, so I will release this small patch version. There's nothing really extra in it except that it has the corrected model number and it scans for HFV files now instead of HFS like it was before... small typo on my part.
http://animezilla.org/BasiliskII-PSP-bin-tiny.zip
http://animezilla.org/BasiliskII-PSP-bin-tiny.zip
w00t
-
- Posts: 5
- Joined: Thu Oct 13, 2005 5:04 am
- Location: USA,VA
- Contact:
Ok sadly, it still wont boot my OS8, still says run the newest installer for this disk.
HOWEVER When I load your system.dsk to boot it, it DOES now see my HD OS8! So meaning my image file from my PC (300 Megs) DOES respond to 7.5.5
Also I tried a OS 7 boot disk, that didnt boot either. So seems ONLY your "system.dsk" is booting, nothing else will boot. I hope I dont need to make a clean .hfv hard drive, then install the whole system manually.. that MIGHT work.. then again I dont know. =(
I would have to try some hardcore testing on that tonight. =(
Edit its nice to see the bootup mode is changed, no more debug code. Good work.
HOWEVER When I load your system.dsk to boot it, it DOES now see my HD OS8! So meaning my image file from my PC (300 Megs) DOES respond to 7.5.5
Also I tried a OS 7 boot disk, that didnt boot either. So seems ONLY your "system.dsk" is booting, nothing else will boot. I hope I dont need to make a clean .hfv hard drive, then install the whole system manually.. that MIGHT work.. then again I dont know. =(
I would have to try some hardcore testing on that tonight. =(
Edit its nice to see the bootup mode is changed, no more debug code. Good work.
~Battlez-avec la Mystique?~
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
Ok, so I'm probably missing the extern "C" thing. This should do the trick, right?:
And now that I think of it, there are in the standard libs all these compile options that add externs depending on if the compiler is C or not. I'll have a look at that, maybe I should include that in the p_sprint.c library also so you don't have to worry about that in cpp projects at all.
If this does the trick, I'll try getting p_sprint in Basilisk up and running tonight, as it looks like I'll have some time.
Code: Select all
extern "C"
{
#include "p_sprint.h"
}
If this does the trick, I'll try getting p_sprint in Basilisk up and running tonight, as it looks like I'll have some time.
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
The keycodes are listed in some other files in the distro. I think the unix folder actually has a file called Keycodes for mapping normal PC keycodes to mac. You might get a huge head start with that.Arwin wrote:Ok, piece of cake! It works, and pretty smooth too. Now I just have to enter the right keyvalues and basic typing is in. :)
Then I'll start working out the best way to get the control keys in there.
Looks like we need some kind of CVS, and it doesn't seem that PS2DEV is willing to host it (i asked a few days ago and still have no response). So I'll be looking around, if anyone has a suggestion, I'm open to that.
w00t
Probably a good idea, but it's not going to be a big problem atm. The lines of code actually affecting Basilisk files are minimal, except for 1 include, 1 variable and 1 init, everything takes place in the 60hz routine, and it won't be much more than 10-15 consecutive lines. So for now I'll post the occasional test .elf here, and send you the any updates as source, and it won't take you a minute to update your project.ChaosKnight wrote:The keycodes are listed in some other files in the distro. I think the unix folder actually has a file called Keycodes for mapping normal PC keycodes to mac. You might get a huge head start with that.Arwin wrote:Ok, piece of cake! It works, and pretty smooth too. Now I just have to enter the right keyvalues and basic typing is in. :)
Then I'll start working out the best way to get the control keys in there.
Looks like we need some kind of CVS, and it doesn't seem that PS2DEV is willing to host it (i asked a few days ago and still have no response). So I'll be looking around, if anyone has a suggestion, I'm open to that.
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA