English Amiga Board


Go Back   English Amiga Board > Search Forums

Showing results 1 to 40 of 518
Search took 0.04 seconds.
Search: Posts Made By: bebbo
Forum: Coders. C/C++ 17 June 2021, 12:28
Replies: 20
Views: 1,240
Posted By bebbo
thank you for that update (my stdint.h includes...

thank you for that update (my stdint.h includes sys/types.h).


But stdint.h is also not referenced by the NDK...
Forum: Coders. C/C++ 16 June 2021, 16:18
Replies: 20
Views: 1,240
Posted By bebbo
the sfd file does not generate struct Layer...

the sfd file does not generate

struct Layer * __CreateUpfrontLayer(__reg("a6") struct Library *, __reg("a0") struct Layer_Info * li, __reg("a1") struct BitMap * bm, __reg("d0") LONG x0,...
Forum: Coders. C/C++ 16 June 2021, 14:04
Replies: 20
Views: 1,240
Posted By bebbo
even after 25 years you can't expect a standard...

even after 25 years you can't expect a standard like 'sys/types.h' to be used or supported...
Forum: Coders. C/C++ 15 June 2021, 06:05
Replies: 1,285
Views: 197,335
Posted By bebbo
Initialization means: struct Library*...

Initialization means:

struct Library* LayoutBase = NULL;



otherwise it's only a declaration.

PS: I removed auto opening for layout.library - there is non in AmigaOS 1/2/3
Forum: News 14 May 2021, 20:44
Replies: 743
Views: 80,363
Posted By bebbo
is a TCP/IP stack included?

is a TCP/IP stack included?
Forum: support.FS-UAE 03 May 2021, 23:47
Replies: 5
Views: 1,939
Posted By bebbo
How did you get that far? Could you tell use...

How did you get that far?

Could you tell use what's needed? Or even share a working hd image / uae config?
Forum: support.WinUAE 30 April 2021, 13:45
Replies: 4
Views: 1,483
Posted By bebbo
Maybe you simply forgot to click the 'Full...

Maybe you simply forgot to click the 'Full drive/RDB mode' button...
Forum: Coders. C/C++ 23 April 2021, 08:58
Replies: 1,285
Views: 197,335
Posted By bebbo
if you group your statements you'll see what I...

if you group your statements you'll see what I mean:






u_int32 output_pixel_index = ry_x + ry_m_render_width;

floor_x__fp += floor_step_x__fp;
Forum: Coders. C/C++ 22 April 2021, 18:25
Replies: 1,285
Views: 197,335
Posted By bebbo
the slow variant has an inner loop whith 18...

the slow variant has an inner loop whith 18 instead of 8 insns, also more memory lookups plus a multiplication - that sums up



I guess the code could be better, but first you should start to...
Forum: Coders. C/C++ 14 April 2021, 08:46
Replies: 7
Views: 718
Posted By bebbo
I recommend using -libnix aka -mcrt=nix20 instead...

I recommend using -libnix aka -mcrt=nix20 instead of clib2.







use the prefixed programs in $PREFIX/bin -> $PREFIX/bin/m68k-amigaos-nm
Forum: Coders. C/C++ 11 April 2021, 20:42
Replies: 15
Views: 1,227
Posted By bebbo
use <number>$ for local labels: void...

use <number>$ for local labels:


void foo() {
asm("1$:");
asm("bra 1$");
}
void faa() {
asm("1$:");
asm("bra 1$");
Forum: Coders. C/C++ 17 March 2021, 08:28
Replies: 1,285
Views: 197,335
Posted By bebbo
http://eab.abime.net/data:text/plain;base64,LyoqCi...

http://eab.abime.net/data:text/plain;base64,LyoqCiAqIFNrZWxldG9uIGZvciBsaWJyYXJpZXMuCiAqLwoKI2luY2x1ZGUgPGV4ZWMvbGlicmFyaWVzLmg+CiNpbmNsdWRlIDxleGVjL25vZGVzLmg+CiNpbmNsdWRlIDxleGVjL3Jlc2lkZW50Lmg+CiNp...
Forum: Coders. C/C++ 16 March 2021, 12:04
Replies: 1,285
Views: 197,335
Posted By bebbo
it's not related to the toolchain - but why do so...

it's not related to the toolchain - but why do so many people use -fbaserel to create libraries, if you could store all your data in your library via a6?
Forum: Coders. C/C++ 15 March 2021, 15:07
Replies: 1,285
Views: 197,335
Posted By bebbo
I recommend using WSL to compile and debug. I...

I recommend using WSL to compile and debug. I even run Eclipse to develop C/C++ within WSL.
You find all your windows drives at /mnt/c etc.p.p. so if you open a WSL bash you can cd and make also on...
Forum: Coders. C/C++ 14 March 2021, 18:55
Replies: 15
Views: 1,227
Posted By bebbo
use the mangled names to refer to these. ...

use the mangled names to refer to these.

e.g.

bsr __Z3fooi

to call the C++ function

int foo(int);
Forum: Coders. C/C++ 14 March 2021, 18:55
Replies: 15
Views: 1,227
Posted By bebbo
m68k-amigaos-as does not need the percent sign...

m68k-amigaos-as does not need the percent sign for registers. The tradeoff is: you can't use symbols having register names.
Forum: Coders. C/C++ 14 March 2021, 18:53
Replies: 1,285
Views: 197,335
Posted By bebbo
plus I recommend using WSL instead of msys2 or...

plus I recommend using WSL instead of msys2 or cygwin!


https://franke.ms/amiga/wsl2.wiki
Forum: Coders. C/C++ 14 March 2021, 16:05
Replies: 1,285
Views: 197,335
Posted By bebbo
or some of the libs aren't build with...

or some of the libs aren't build with -mhard-float?
Forum: Coders. C/C++ 14 March 2021, 16:04
Replies: 1,285
Views: 197,335
Posted By bebbo
maybe you are not linking against -noixemul ?

maybe you are not linking against -noixemul ?
Forum: Coders. C/C++ 14 March 2021, 08:27
Replies: 15
Views: 1,227
Posted By bebbo
On the Amiga the called function saves all...

On the Amiga the called function saves all modified registers but not d0/d1/a0/a1/fp0/fp1.



the doc for inline assembly is there https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html


...
Forum: Coders. C/C++ 27 February 2021, 08:26
Replies: 16
Views: 1,470
Posted By bebbo
a proper malloc/free implementation must free...

a proper malloc/free implementation must free it's allocated memory on program exit.


that implementation usually frees the underlying large memory chunks. Consider a 16kB chunk size and single...
Forum: Coders. C/C++ 22 February 2021, 09:12
Replies: 2
Views: 1,026
Posted By bebbo
Arrow I prefer to use only: -noixemul PS:...

I prefer to use only:
-noixemul

PS: https://github.com/bebbo/amiga-gcc/wiki/Libraries
Forum: Coders. C/C++ 02 February 2021, 08:53
Replies: 1,285
Views: 197,335
Posted By bebbo
int __saveds QBobFunc(struct myBltNode *node...

int __saveds QBobFunc(struct myBltNode *node asm("a1"))
{
...
}



__saveds is only needed if a baserel data model is used - it means that the function loads the a4 register. Useful in...
Forum: Coders. C/C++ 02 February 2021, 08:50
Replies: 1,285
Views: 197,335
Posted By bebbo
the bgdbserver allows you to debug your program...

the bgdbserver allows you to debug your program on the Amiga remotely.
What you need is a working TCP/IP stack on your Amiga, then you can debug the program even on a real Amiga.


debugging >...
Forum: Coders. C/C++ 01 February 2021, 16:52
Replies: 14
Views: 2,252
Posted By bebbo
Quick guess: Your "phantom memory loss" is...

Quick guess:
Your "phantom memory loss" is related to your console history/buffer.

EDIT:

more time to write now:

I can run that example program over and over and the memory reported by...
Forum: Coders. C/C++ 06 January 2021, 15:55
Replies: 8
Views: 1,423
Posted By bebbo
you might also consider int...

you might also consider


int scandir(const char *dirname,struct dirent ***namelist,
int (*select)(const struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **))...
Forum: support.WinUAE 04 January 2021, 20:35
Replies: 4
Views: 811
Posted By bebbo
good to know :spin I disabled JIT and was...

good to know :spin


I disabled JIT and was able to hunt down the culprit. libpthread is working better now and libnix provides thread safe FILE functions (if all is build for thread usage)^^

...
Forum: support.WinUAE 01 January 2021, 18:09
Replies: 4
Views: 811
Posted By bebbo
(spam the exe and pray) never mind -...

(spam the exe and pray)



never mind - I found the real cause^^ - but IMHO WinUAE should not crash^^


HNY2021
Forum: support.WinUAE 31 December 2020, 15:43
Replies: 4
Views: 811
Posted By bebbo
crash if JIT is enabled

I'm testing libpthread atm... and I get a WinUAE crash if JIT is enabled:



WinUAE message


JIT: serious error
JIT: 64-bit pointer (0xffffffffffffff8b) at...
Forum: Coders. C/C++ 31 December 2020, 14:04
Replies: 26
Views: 2,443
Posted By bebbo
you could precompute the "stack" Rename...

you could precompute the "stack"


Rename DrawSection to PreComputeSection and add a 2nd parameter.
Replace the real drawing part with an update to ordered.
You'll end up with a null terminated...
Forum: Coders. C/C++ 30 December 2020, 21:23
Replies: 26
Views: 2,443
Posted By bebbo
and with a little bit more if/else the 2nd stack...

and with a little bit more if/else the 2nd stack can be spared


void DrawSection(const Section *section) {
const Section *stack[STACKSIZE];
const Section **stackTop = stack;

// mark end...
Forum: Coders. C/C++ 30 December 2020, 19:58
Replies: 26
Views: 2,443
Posted By bebbo
nice - what compiler/options do you use? ...

nice - what compiler/options do you use?


Would you test one more variant?

void DrawSection(const Section *section) {
const Section *stack[STACKSIZE];
const Section...
Forum: Coders. C/C++ 30 December 2020, 18:52
Replies: 26
Views: 2,443
Posted By bebbo
I forgot a ++listTop; after the inner for(;;)...

I forgot a ++listTop; after the inner for(;;) loop - the listTop was moved to the terminating zero and must not kill this^^
Forum: Coders. C/C++ 30 December 2020, 16:05
Replies: 26
Views: 2,443
Posted By bebbo
first here is a maybe faster version, I would not...

first here is a maybe faster version, I would not count on the recursive version to be faster, since each call with the register push/pops takes also time

void DrawSection(const Section *section)...
Forum: Coders. C/C++ 30 December 2020, 09:45
Replies: 26
Views: 2,443
Posted By bebbo
untested...: // use even numbers cos of...

untested...:

// use even numbers cos of char...
#define STACKSIZE 100
#define MAXPUSHPERLOOP 4

void DrawSection(const Section *section) {
const Section *stack[STACKSIZE];
char...
Forum: Coders. C/C++ 29 December 2020, 22:53
Replies: 12
Views: 2,461
Posted By bebbo
fix for this specific issue is queued - should be...

fix for this specific issue is queued - should be live soon


(gdb) list
1 #include <stdio.h>
2
3 int main(int argc, char** argv)
4 {
5 for(int i=0;i<argc;i++)
6 ...
Forum: Coders. C/C++ 29 December 2020, 22:52
Replies: 26
Views: 2,443
Posted By bebbo
My "simple" approach: 1. use a stack 2....

My "simple" approach:

1. use a stack
2. push the initial value
3. loop over the stack and pop until it gets empty
4. fill a list during loop and collect all values of recursive calls
5. push...
Forum: Coders. C/C++ 29 December 2020, 22:37
Replies: 12
Views: 2,461
Posted By bebbo
1. your example does not compile fixed version...

1. your example does not compile
fixed version is
#include <stdio.h>

int main(int argc, char** argv)
{
for(int i=0;i<argc;i++)
printf("Arg #%d -> %s\n",i,argv[i]);
return 0;
}
Forum: Coders. C/C++ 22 December 2020, 13:32
Replies: 28
Views: 3,847
Posted By bebbo
this looks wrong: do { ...

this looks wrong:

do
{
if(GetMsg(_con_reply_port))
{
// Nothing to do
}
else
{
Forum: Coders. C/C++ 11 December 2020, 07:10
Replies: 28
Views: 3,847
Posted By bebbo
guess you'd have to use a static variable ...

guess you'd have to use a static variable



#pragma pack(push,4)
static struct StandardPacket con_standard_packet;
#pragma pack(pop)
Showing results 1 to 40 of 518

 
Forum Jump

All times are GMT +2. The time now is 18:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.10966 seconds with 10 queries