Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
102 user(s) are online (57 user(s) are browsing Forums)

Members: 0
Guests: 102

more...

Headlines

Forum Index


Board index » All Posts (flash)




Re: WarpOS/PowerOpenABI vs OS4/ System V.4 ABI problems
Just popping in
Just popping in


rlwimi r10,r11,0,16,31
rlwimi r10,r11,0,24,31

can be both replaced with
andi r10,r11,0xFFFF
andi r10,r11,0xFF

compiler has generated a complex instruction instead of a much simpler one

About DSI crash it could be a previous mem allocation bug, so pointers r3 and r4 can exceed limits.

Memento audere semper!
Go to top


Re: WarpOS/PowerOpenABI vs OS4/ System V.4 ABI problems
Just popping in
Just popping in


In the first post there's the whole code.
Maybe instead of debug ASM it can be rewritten in C, it's quite short.

Memento audere semper!
Go to top


Re: H&P PowerAsm
Just popping in
Just popping in


@kas1e

_BlankChunky:
lis 26,_BlankChunky@ha # load the address of the label
addi r26,26,_BlankChunky@l # in r26 (2 steps)


whitout use of mnemonics try these two couple of commands, maybe on your assembler you have to remove the '%' or '%r' registers prefix, under GCC instead I use this.

addis %r26,0,_BlankChunky@ha
addi %r26,%r26,_BlankChunky@l


*************************************

ADDIS - Add Immediate Shifted

Syntax: addis rD,rA,SIMM

This command is used to add a 16-bit immediate value to the upper 16 bits of a 32bit register. It adds a 16-bit signed integer (SIMM) to register rA, then shifts left register rA by 16 bits and then puts the result into the register rD (destination). The lower 16 bits are cleared by this command. So to fill a 32 bit register with an immediate 32-bit value you first have to use addis to fill the upper 16 bits and then addi to fill the lower 16 bits. Otherwise the lower 16 bits would be cleared again by the addis command.

Example: addis 3,3,4

In this example GPR3 and the value 4 are added, then GPR3 is shifted 16 bits to the left and the result is put into GPR3. This will then contain 0x00040000 in hexadecimal. If you then execute an addi 3,3,4 command GPR3 will contain 0x00040004 in hexadecimal.

To move a pointer to an address of a variable or function into a register there are the @ha/@h and @l modifiers available. If you append these to the variable name you get the lower (@l) 16 bit of the absolute 32-bit address of the variable and with @ha you get the higher 16 bit of the absolute 32-bit address.

Example:

addis 3,0,hello@ha
addi 3,0,hello@l
With these two instructions the absolute 32-bit address of the string variable hello is moved into the GPR 3 register.

Instead of addis/addi the mnemonics lis/la are often used.


Edited by flash on 2022/4/11 1:37:20
Go to top


Re: H&P PowerAsm's prolog/epilog and pushgpr/popgpr for vasmppc macros ?
Just popping in
Just popping in


About PowerASM you can ask to Sam Jordan http://www.sam-jordan.ch/software.htm

Anyway different ABI lead you to change registers usage.

Memento audere semper!
Go to top


Re: H&P PowerAsm's prolog/epilog and pushgpr/popgpr for vasmppc macros ?
Just popping in
Just popping in


I want point also to this fast/simple url about powerpc assembler https://wiibrew.org/wiki/Assembler_Tutorial

Sometimes is faster to replace simple macros instead of resolve them for specific assembler rules not widely supported.

A couple of "lis" and "addi" can be a fast solution to replace "la" macro

Memento audere semper!
Go to top


Re: H&P PowerAsm's prolog/epilog and pushgpr/popgpr for vasmppc macros ?
Just popping in
Just popping in


Lookat here, it's quite simple task replace those macros for GPRS and FPRS regs.
PowerPC assembler is much more robust and simpler than old 68k

IBM docs prolog/epilog

Go to top


Re: Are AmigaKit still selling X5000 machines?
Just popping in
Just popping in


Regarding seeing everything in black and white, it is a common vision for many developers.
I had to work hard on myself to understand that people are very different from machines and that their decisions are often the result of buggy algorithms or wrong impressions.
This from my point of view, but for them the one who is bugged is me.
Once this is accepted by both parties, a negotiation can begin, the outcome of which remains uncertain.

What matters most now, however, is to resume the dialogue and see if time allows for new solutions to arrive that can allow the development of AmigaOS to move forward.

Also I am definitely convinced that the secret is to make the whole system open source but at the same time find a strong management that can profit from the development and sales of the system.

Memento audere semper!
Go to top


Re: AmiKit XE running AmigaOS 3.2
Just popping in
Just popping in


@joerg

I suggest you to open a thread on major Amiga forums, tell your experience and ask for a community refund for your never payed work.

Let us know your paypal account or some other way to donate.

I can give you a litte month by month and support your old and future efforts, I'm sure others can do the same.

I don't know if this can refund 100% but I hope this approach can give you a little satisfaction and let you come back to amiga community.

I'm quite sure the only way to do further in "Amigaland" is release opensource projects, with some kind of restricted license to avoid others to sell your work for free.

Go to top


Re: No std::to_string(float) in GCC 11
Just popping in
Just popping in


@salass00

Nice to know, thanks!

Go to top


Re: AmiKit XE running AmigaOS 3.2
Just popping in
Just popping in


I wonder if instead of removing it and mortify amiga users, there is a way to pay legitimate developer for the job done.

The same could be done for other os4 core software not payed.
Maybe a community bounty could be a valid solution?

Once payed all software could be possible publish sources on github or other public repositories with some kind of "permissive" licence?
..ask for a friend

Go to top


Re: Why call to or any "empty" functions can cause different results of the code in which you insert it?
Just popping in
Just popping in


@kas1e

I don't think it's a race condition.
What if Delay (0)?

Go to top


Re: AmiDVD patching
Just popping in
Just popping in


@joerg

I hope you can come back to Amiga coding and have fun, again.

OS4 is really a great piece of software and it improves greatly old amigaos experience on NG systems.
Tanks a lot!

Memento audere semper!
Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Just popping in
Just popping in


@kas1e

To emulate OS4 under x64 we have two choices: WinUAE for windows users or UAE/QUEMU for linux users.

UAE/WinUAE are based on an old version of QEMU engine, PPC emulation was added as plugin.
You can emulate an Amiga classic with a PPC expansion board and it's fully compatible with OS4.1fe
You can archive a good speed on gfx side setting UAEGFX as board, but it's ok also with Picasso IV board, but in this case you are limited with 4mb ram to 32bit hd resolutions.
Cpu/fpu emulation has some little bugs, all fixed in latest QEMU releases. Sadly both Toni and Frode, as stated on some EAB posts, aren't interested in a new QEMU plugin version and considers OS4 compatibility as a "side effect" adding powerpc board emulation.
So OS4 compatibility is remained without any active support.

On QEMU side we have Sam460ex and Pegasos II boards emulation, but we have more severe limitations because some motherboard features aren't still implemented.
So you have a limited GFX card compatibility and graphics speed is very poor.
Instead CPU/FPU are well emulated and speed is quite good and has no bugs in powerpc instruction emulation.

So to improve/develop further OS4 emulation we need:
for UAE/WinUAE a new plugin version based on latest QEMU sources
for Sam460ex/Pegasos II board a better gfx implementation with also 3d support.

Sadly QEMU project is really hard and complex!
It's not an easy task and to emulate an expansion board like a gfx card or a sound card you should know all it's chipset internals.
There's an active project to emulate a radeon board but it's still incomplete due lack of chip documentation.

https://osdn.net/projects/qmiga/wiki/SubprojectAti
https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2
http://zero.eik.bme.hu/~balaton/qemu/amiga/

Go to top


Re: Fading effect on 24bit ARGB screens
Just popping in
Just popping in


@salass00

I use to look as much as possible your code on the net
Thank you for your answer.

Go to top


Re: Fading effect on 24bit ARGB screens
Just popping in
Just popping in


@Petrol

Good spot, I'll have to made main window a reaction window.
Thanks!

Go to top


Re: Fading effect on 24bit ARGB screens
Just popping in
Just popping in


For now I have resolved with this Fade (to black) C function, it's perfect on 8bit screens, and good for 24bit screens in low/med resolutions. In hires it's a bit slow. Maybe in future I can look for compositing use to get a butter effect even on 24bit/hires screens.
Anyway some hardware acceleration can be inside ReadPixelArray and WritePixelArray OS4 API Calls, but fading effect is all cpu brute force, writing in system memory.

Here is complete C function, it works ok when I use "Win->Width * 4" inside Read/WritePixelArray api calls, but fails if I use Win->RPort->Bitmap->BytesPerRow value.

extern uint8 *ARGBMEM;

int16 Fade (struct Window *Win, uint32 *PaletteSrc, uint32 MaxStep, uint32 MyTimeDelay, int16 ToBlack)
{
// DisplayInfoHandle DHandle;
// struct DimensionInfo DimInfo;
static uint32 __attribute__ ((aligned (16))) PaletteTmp [3L * 252L + 2L];
// uint8 *ARGB = NULL;
uint8 R, G, B;
int16 Success = FALSE;
uint32 Var, Step, Rows, Cols, Modulo;
uint32 DstWinWidth, DstWinHeight, Depth, Color, Range, ModeID;
/*
ModeID = GetVPModeID (ViewPortAddress (Win));
DHandle = FindDisplayInfo (ModeID);

if (!((DHandle) && GetDisplayInfoData (DHandle, (uint8 *) &DimInfo, sizeof (struct DimensionInfo), DTAG_DIMS, ModeID))) goto ExitFade;
*/
DstWinWidth = ((Win->Flags & WFLG_GIMMEZEROZERO) ? Win->GZZWidth : Win->Width);
DstWinHeight = ((Win->Flags & WFLG_GIMMEZEROZERO) ? Win->GZZHeight : Win->Height);
Depth = GetBitMapAttr (Win->RPort->BitMap, BMA_DEPTH);

if (Depth == MIN_DEPTH) // 8 bit screens
{
if (ToBlack)
{
Range = (1L << Depth) - 4L;
PaletteTmp [0L] = (Range << 16L) + 4L;
GetRGB32 (((struct ViewPort *) ViewPortAddress (Win))->ColorMap, 4L, Range, &PaletteTmp [1L]);
PaletteTmp [3L * Range + 1L] = NULL;
PaletteSrc += (3 * RESERVED_PENS); /* exclude reserved pens for GUI */

for (Step = 0L; Step <= MaxStep; Step++)
{
for (Var = 1; Var <= 3L * Range; Var+=3) /* unroll loop 3 times */
{
if (PaletteTmp [Var + 0])
{
Color = (uint32) (((PaletteSrc [Var + 0] >> 24L) * (MaxStep - Step)) / MaxStep);
PaletteTmp [Var + 0] = (Color << 24L);
}

if (PaletteTmp [Var + 1])
{
Color = (uint32) (((PaletteSrc [Var + 1] >> 24L) * (MaxStep - Step)) / MaxStep);
PaletteTmp [Var + 1] = (Color << 24L);
}

if (PaletteTmp [Var + 2])
{
Color = (uint32) (((PaletteSrc [Var + 2] >> 24L) * (MaxStep - Step)) / MaxStep);
PaletteTmp [Var + 2] = (Color << 24L);
}
}

WaitTOF ();
LoadRGB32 (ViewPortAddress (Win), &PaletteTmp);
Delay (MyTimeDelay);
}
}

else
{
for (Var = 0; Var < ((DstWinWidth * DstWinHeight) / 4); Var++)
WritePixelColor (Win->RPort, rand() % (DstWinWidth - 1), rand() % (DstWinHeight - 1), 0xff000000);
}

Success = TRUE;
goto ExitFade;
}

else if (Depth == MAX_DEPTH) // 24bit screens
{
if (ToBlack)
{
Modulo = DstWinWidth;

ReadPixelArray (Win->RPort, 0, 0, ARGBMEM, Win->LeftEdge, Win->TopEdge,
Modulo * 4, PIXF_A8R8G8B8, DstWinWidth, DstWinHeight);

for (Step = 0L; Step <= MaxStep; Step++)
{
for (Cols = Win->TopEdge; Cols < (DstWinHeight * 4); Cols += 4)
{
for (Rows = Win->LeftEdge; Rows < (DstWinWidth * 4); Rows += 8) // unroll loop twice
{
if ((R = *(ARGBMEM + (Cols * Modulo + (Rows + 1)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 1))) = (uint8) ((R * (MaxStep - Step)) / MaxStep);

if ((G = *(ARGBMEM + (Cols * Modulo + (Rows + 2)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 2))) = (uint8) ((G * (MaxStep - Step)) / MaxStep);

if ((B = *(ARGBMEM + (Cols * Modulo + (Rows + 3)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 3))) = (uint8) ((B * (MaxStep - Step)) / MaxStep);

if ((R = *(ARGBMEM + (Cols * Modulo + (Rows + 5)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 5))) = (uint8) ((R * (MaxStep - Step)) / MaxStep);

if ((G = *(ARGBMEM + (Cols * Modulo + (Rows + 6)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 6))) = (uint8) ((G * (MaxStep - Step)) / MaxStep);

if ((B = *(ARGBMEM + (Cols * Modulo + (Rows + 7)))))
*(ARGBMEM + (Cols * Modulo + (Rows + 7))) = (uint8) ((B * (MaxStep - Step)) / MaxStep);
}
}

WaitTOF ();
WritePixelArray (ARGBMEM, 0, 0, Modulo * 4, PIXF_A8R8G8B8,
Win->RPort, Win->LeftEdge, Win->TopEdge, DstWinWidth, DstWinHeight);
Delay (MyTimeDelay);
}
}

else
{
for (Cols = Win->TopEdge; Cols < DstWinHeight; Cols += 2)
{
for (Rows = Win->LeftEdge; Rows < DstWinWidth; Rows += 4) // unroll loop twice
{
WritePixelColor (Win->RPort, Rows, Cols, 0xff000000);
WritePixelColor (Win->RPort, Rows + 2, Cols, 0xff000000);
}

Delay (MyTimeDelay / 2);
}
}

Success = TRUE;
}

ExitFade:
return (Success);
}

Memento audere semper!
Go to top


Re: Micro A1-C, overclocking, PCI cards, etc..
Just popping in
Just popping in


@MigthyMax

When you change from ide to sata there’s a completely protocol change.
IMHO much better to use ide to cf adapter, in this case I suggest to use industrial Cf cards.
I’m waiting for this solution to came from china, I ordered it on AliExpress.
Prices are quite cheap.

Go to top


Re: Micro A1-C, overclocking, PCI cards, etc..
Just popping in
Just popping in


@Mikey_C

Because you don’t know “Fiat Duna”

Go to top


Re: Fading effect on 24bit ARGB screens
Just popping in
Just popping in


Thank you I can give it a look.
Really I was looking for something much simpler, without use of SDL. Is there any other spot?

Memento audere semper!
Go to top


Fading effect on 24bit ARGB screens
Just popping in
Just popping in


Hi Guys, I'm looking for a fast and simple fading effect for OS4 and 24bit ARGB screens.
My primary goal is a "fade to black" effect but as second option a "fade from black" is welcome too. I'm looking for some C code already done to adapt in a fast way. Tnx!

Go to top



TopTop
« 1 ... 3 4 5 (6) 7 8 9 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project