Welcome, Guest. Please login or register.

Author Topic: We need an iBrowse replacement for 68k!!!  (Read 76122 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #119 from previous page: February 23, 2015, 11:25:17 PM »
Quote from: matthey;785264
Hook problem? Fixing the registers in all hooks could make a lot of things work ;).

Yes... just done it (might* have missed some, but we'll find out)

Uploaded a new version from my bitmap fonts branch (as I don't want to merge this yet).

* Actually I know I've missed some, but nothing important for now.
« Last Edit: February 23, 2015, 11:29:14 PM by chris »
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #120 on: February 24, 2015, 12:03:39 AM »
Quote from: matthey;785270
Bingo!!! Most menu items and gadgets work now! It is faster than ever also. Awesome!!!

Cool.  I changed the CPU option to -m68020-60, not sure if that is the cause of the speed boost or something else.

@wawrzon

The text width etc calculations are currently somewhat broken in bitmap mode, I'm aware of that.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #121 on: February 24, 2015, 07:17:56 PM »
Quote from: wawrzon;785273
probably plotting gfx elements can still be optimized

No "probably" about it, as I say graphics are still routing via DataTypes (even on high-colour screens) which is not a fast way of doing things.  What I need is an optimised RGBA=>dithered palette mapped BitMap, with optional optimised scaling built-in.  Anyone?

Quote from: wawrzon;785277
@chris
what was previous setting? plain -m68000?

-m68020

Quote from: matthey;785279
The one 68k build of AWeb with GCC is using:

Code: [Select]
-O2 -fomit-frame-pointer -m68020-60

I'm using:

Code: [Select]
m68020-60 -O0 -fomit-frame-pointer
So, the same basically :)  Be nice if somebody could give me a fix for that GCC optimisation bug, or tell me which optimisation causes it so I can disable it.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #122 on: February 24, 2015, 09:56:25 PM »
Quote from: wawrzon;785277

i have an impression as if when loading the page the browser is busy looping at times, because it freezes, but it may just be high priority cpu last.


I'm getting freezing when using the diskfont code.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #123 on: February 25, 2015, 04:04:28 PM »
Quote from: utri007;785403
I didn't mention snoopdos now, because I had already mentioned it. It crash after makedir command, next would be mime initialization.


Did you run the newer version with logging?  I added a couple of extra lines to determine whether it's the MIME part crashing.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #124 on: February 25, 2015, 11:01:44 PM »
Quote from: matthey;785353
Seeing at least one of the taglist problems occured with NewObjectA(), you might check this:



http://guidetoamigacompatibleprogramming.googlecode.com/svn/trunk/english/CAP_2.txt

My GCC 3.4.0 version of os-include/inline/intuition.h is a little bit different if you want to try it too:

http://www.heywheel.com/matthey/Amiga/INTUITION.H


Both give me:
Code: [Select]

error: syntax error before ')' token


Where I use a NewObject embedded into an if statement.

It looks very likely to be the fix though, as all the other varargs stubs are #defined like that.  Not sure why this one isn't working.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #125 on: February 27, 2015, 11:01:50 AM »
Quote from: matthey;785455
I wonder if there is a parsing bug in your version of GCC.


I doubt it.  There would be many more problems than this if there was.

Quote
I believe these are optional inlines instead of using the default stubs so if you can't format the function so GCC will accept it then try commenting it out.


Just get errors about there being no NewObject function.

I think all that is required is to tell GCC that the varargs are used so it doesn't optimise them away.  I can't figure out how to do that though.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #126 on: February 27, 2015, 11:30:48 PM »
Quote from: matthey;785561
More lines may help to find what the compiler doesn't like if the line the error is on is given. If this doesn't work, maybe it would be possible to make NewObject into a regular function:

Code: [Select]
NewObject(classPtr, classID, tags...)
{
ULONG _tags[] = {tags};
NewObjectA(classPtr, classID, (const struct TagItem *) _tags);
}

I'm hoping that either the different formatting or an error message with a line number would help pinpoint the problem or, perhaps, the error would go away.

I'd tried that already (as an inline function though) and it complained that classPtr, ClassID etc weren't defined, which is an even stranger error.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #127 on: February 28, 2015, 12:25:45 PM »
Quote from: Joloo;785604
Variadic functions of Intuition were always trouble makers for different versions of GCC compilers and m68k.
Instead of creating inline code use the amiga.lib provided code, which works flawlessly for Intuition/MUI/ReAction.

Code: [Select]

#include <proto/...>
#include <proto/...>
#if defined(__GNUC__) && !defined(__amigaos4__)
#define NO_INLINE_STDARG /* Take f.e. NewObject() from amiga.lib for gcc m68k */
#include <clib/intuition_protos.h>
#include <proto/intuition.h>
#undef NO_INLINE_STDARG
#else
#include <proto/intuition.h> /* Take/Create inline code f.e. for NewObject() */
#endif
#include <proto/...>
#include <proto/...>


That might have worked, had clib2 actually had NewObject in libamiga.

I suppose I could use a different libamiga.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #128 on: February 28, 2015, 12:31:59 PM »
Quote from: matthey;785572
That is strange. The function arguments shouldn't need defining in the function. The function needs defining which it already is in os-include/clib/inution_protos,h with the argument types given.


I think it's because "ULONG tags..." isn't a valid definition for a proper function.

I'm getting errors even when the #define is just:
Code: [Select]

({ \
})


"syntax error before ')'" and "unterminated argument list".

Code: [Select]

if((arexx_obj = ARexxObj,
AREXX_HostName,"NETSURF",
AREXX_Commands,Commands,
AREXX_NoSlot,TRUE,
AREXX_ReplyHook,NULL,
AREXX_DefExtension,"nsrx",
End))
{
...etc...


When ArexxObj is:
Code: [Select]

#define ARexxObj NewObject(ARexxClass, NULL


And End is the standard one from reaction_macros which IIRC is "TAG_END)"
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #129 on: March 01, 2015, 11:30:32 AM »
Quote from: matthey;785630
It's not possible to have all the arguments as varargs. Also, "ULONG tags ..." is not allowed with C99. C99 only allows "..." but the default GCC compile mode may have a GCCism extension which allows for better type checking.

I think it's fine for a #define, just not for a function, the two work differently.  If it wasn't then all the other varargs stub inlines would be broken too.

I've uploaded a version with the libraries built for 68020, to see whether that makes any speed difference.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #130 on: March 01, 2015, 09:56:29 PM »
Quote from: matthey;785708
I wonder how many scalable fonts are opened still with the mapping to bitmap fonts in Choices?

If you've set the fonts to be bitmap ones, then none :-)

Quote
The NetSurf archive I downloaded today is 3104254 bytes which is the same as the one I downloaded on February 23. The executable is also the same size.

I've re-uploaded it.  Not sure what happened last time but it should be there now.

Quote from: utri007
Few seconds more and computer crashes. Are those .otag fonts outlined fonts? Do I need to remove them?

Try running FixFonts.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #131 on: March 02, 2015, 10:33:29 AM »
Quote from: matthey;785730
It's noticably faster here. NetSurf is done loading from icon in about 5 seconds and amiga.org loads in about 20 seconds. That's pretty good for not having optimizations enabled yet ;).

Cool.

Quote
Edit: There are still some places that are quite slow and some that may get caught in an infinite loop. I am trying to debug what looks like an infinite loop after logging into amiga.org and when being redirected back to the old thread. I see scrollbar_create(), scrollbar_make_pair() and a realloc() that I believe may be in desktop/textarea.c textarea_reflow_multiline()? Did you fix the textarea_scrollbar_callback hook for scrollbar_create()? There are several callback hooks in this vacinity which might be worth looking over. I don't get any hits but I didn't last time there was a hook problem. No hits and no freezes makes for some tough debugging.

They aren't AmigaOS hooks, so should be fine.

Quote
Edit2: I strongly believe that the infinite loop is the for loop in textarea_reflow_multiline() which starts with:

Code: [Select]
for (; len > 0; len -= b_off, text += b_off {

I can see the para_end string is "Reply" and no '\n' (newline) is found. I can't see a function name for nsfont.font_split() but there is a JSR. From there:

it looks like x is 0
(x <= h_extent) skip {}
(x <= avail_width) skip {}
(line <= ta-->lines_alloc_size - 2) skip {}
(para_end != text + b_off) skip {}
(len - b_off > 0) { for loop terminates with (space <= text) before first iteration skip {}, (space == text) skip }
(line > scroll_lines) but (ta->bar_y != NULL) skip the break;
back to the top of the for loop and repeat for infinity

Yes, that's the dodgy bitmap font code showing through.  The split function isn't working as intended (amiga_bm_nsfont_split() in font_bitmap.c).  If you disable bitmap (diskfont) fonts the infy-looping should disappear.
« Last Edit: March 02, 2015, 10:36:33 AM by chris »
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #132 on: March 03, 2015, 12:17:06 AM »
Quote from: utri007;785769
I have excatly same versions of diskfon and bullet.library that you have.

diskfont.library 45.7 (01/26/02)
bullet.library 44.1 (05/01/99)

No Outline fonts and all (two) .otag fonts removed  and fixfonts runned.

No difference.

You shouldn't go around deleting .otag files.

What is happening is NetSurf has decided you have a font with no name (probably due to a corrupt font cache, .font file or a bug in my code), so it is trying to read FONTS:.otag.  This probably isn't the cause of the crash, as that file open will just fail.  There is definitely a problem with the font scanner but I don't really have anything to go on to track it down.  If you're using diskfont fonts the scan is irrelevant anyway, as it's for font substitution for characters that aren't in the current font, which isn't possible to do when all your fonts are forced into ISO-8859-1.

You can trick it into skipping the font scan by creating a file "FontGlyphCache" containing the following:
0x0000 "CGTimes"

Put that file in your user directory (PROGDIR:Users/default or whatever) and it won't scan as it'll think it already has.

I'll add something to skip the scan if outline fonts aren't being used.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #133 on: March 14, 2015, 10:29:22 AM »
Quote from: QuikSanz;786320
Any progress? A capable 68k solution is sorely needed.

I've not done anything further with it.  Well, actually, I tried to fix the bitmap font stuff to make line breaks work properly (and get rid of the infy loop), but I just made it worse so gave up.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chris

Re: We need an iBrowse replacement for 68k!!!
« Reply #134 on: March 14, 2015, 02:54:12 PM »
Quote from: utri007;786322
What would be facts? When starting it reguires only 5mb ram?

Try 32MB.  It just about starts with 18MB so it might be possible to get it running with that amount, but I'd suggest the minimum should be 32MB.

Quote
I requires OS3.5/3.9 maybe it will work with OS3.1 with Reaction installed? It requires AGA or RTG.

The library versions requested basically ensure that OS3.5+ is required.  Maybe it's possible to get it running under OS3.1 but the amount of stuff I've already had to backport is rather high anyway (don't let anybody tell you OS4 isn't much of an improvement over 3.1 - it has so much that makes it far easier to develop for).  AGA or RTG, both should work.

Quote
What is current state? Is it bog slow or is it "semi useable"?

No idea.

Quote
What is needed by coder?

A Linux (V)M to install the m68k toolchain on.

Quote
What are current problems?

http://wiki.netsurf-browser.org/Todo/AmigaOS_frontend#OS3_Support
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz