For discussions about development of TAPs, patches and other software for the Toppy

Moderator: Technical

Post Reply
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Crash when doing GetOSDRegionHeight

Post by Geoff Bacon »

Hi

After successfully creating an OSD, the toppy crashes if I try to interrogate it's height (I know it works because I can use it to display output using standard functions).

Anyone have any idea what I am missing?

Code: Select all

 Snippet:

int Rgn;
    Rgn = TAP_Osd_Create( 0, 0, MaxXValue, MaxYValue, 0, FALSE );
    TAP_Print("Rgn=%d\n", Rgn);
    TAP_Print("GetOSDRegionHeight(Rgn)=%d\n",GetOSDRegionHeight(Rgn));

The output is

Rgn=128  

$sp=80500078
$at=82cd2d70    $v0=fffec021    $v1=ffffc021    $a0=00000003
$a1=804fff0c    $a2=804fff0c    $a3=8015ac38    $t0=0000000
$t1=30008000    $t2=fc00ffff    $t3=00000001    $t4=0fffffff
$t5=0000000f    $t6=00000000    $t7=00000011    $t8=0000000d
$t9=82cd04bc    $s0=fffec821    $s1=82d643a0    $s2=82cd3b16
...
Same effect if I try to access Width etc,
I've looked though the GetOSDRegionHeight.c in the libFirebird[av] but there isn't much in that file!

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

Quick thought - has the FireBirdLib been initiated - normally he checks at the beginning of each function, but perhaps he forgot here?

EMJB
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

Just checked and find that I have called both InitTAPAPIFix() and InitTAPex() in the Tap_Main routine.

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

Have you tried with slightly different OSD sizes? - Perhaps there is something funny if the height 576 & width of 720.

I know it doesn't help, but am puzzled by your code - the answer should be MaxYValue so why use GetOSDRegionHeight()?

EMJB
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

The max values were just used as an example; I'm trying to write a generic routine for use with your routines to get the width of the region so that I can add a scrollbar. I'm trying to base the routine on FireBird's DrawWindowScrollBar.

I've tried building DialogDemo in FBs dialog folder to see if I can get that to work with a view to enhancing it to test scrolling but it won't build and googling doesn't help.

I'm using a virgin DialogDemo.c with the Makefile target as
"DialogDemo.elf:: DialogDemo.o libtap.a libFireBird.a"
It compiles but generates link errors:-

Code: Select all

/usr/local/topfield-gcc/bin/mips-gcc -mqnxpic -fno-delayed-branch -mlong-calls -msoft-float -isystem /usr/local/topfield-gcc/topfield-sdk/include -D_TAP -O2   -c -o DialogDemo.o DialogDemo.c
/usr/local/topfield-gcc/bin/mips-gcc -mqnxpic -fno-delayed-branch -mlong-calls -msoft-float -isystem /usr/local/topfield-gcc/topfield-sdk/include -L/usr/local/topfield-gcc/topfield-sdk/lib -ltap -lc -lm   DialogDemo.o   -o DialogDemo
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x14): In function `_start':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:80: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x18):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:80: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x38):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:110: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x3c):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:110: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x9c): In function `zerobss':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:147: undefined reference to `get_mem_info'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xa4):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:150: undefined reference to `__stack'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xa8):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:151: undefined reference to `__stack'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xd0): In function `init':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:180: undefined reference to `hardware_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xd4):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:181: undefined reference to `hardware_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xe8):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:186: undefined reference to `software_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xec):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:187: undefined reference to `software_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x100):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:192: undefined reference to `_fini'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x104):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:193: undefined reference to `_fini'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x110):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:207: undefined reference to `_init'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x128):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:219: undefined reference to `main'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x138): In function `_exit':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:260: undefined reference to `hardware_exit_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x13c):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:261: undefined reference to `hardware_exit_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/libc.a(__atexit.o)(.text+0x78): In function `__register_exitproc':
/cygdrive/c/cygwin/topfield-gcc/build-newlib/mips/soft-float/newlib/libc/stdlib/../../../../../../newlib-1.13.0/newlib/libc/stdlib/__atexit.c:38: undefined reference to `malloc'
/usr/local/topfield-gcc/mips/lib/soft-float/libc.a(__call_atexit.o)(.text+0x184): In function `__call_exitprocs':
/cygdrive/c/cygwin/topfield-gcc/build-newlib/mips/soft-float/newlib/libc/stdlib/../../../../../../newlib-1.13.0/newlib/libc/stdlib/__call_atexit.c:74: undefined reference to `free'
DialogDemo.o(.text+0x7c): In function `TAP_EventHandler':
DialogDemo.c: undefined reference to `DialogProfileCheck'
DialogDemo.o(.text+0xf0):DialogDemo.c: undefined reference to `DialogWindowInit'
DialogDemo.o(.text+0x140):DialogDemo.c: undefined reference to `DialogProfileLoadMy'
DialogDemo.o(.text+0x158):DialogDemo.c: undefined reference to `DialogWindowReInit'
DialogDemo.o(.text+0x1e4):DialogDemo.c: undefined reference to `DialogWindowItemAdd'
DialogDemo.o(.text+0x218):DialogDemo.c: undefined reference to `DialogWindowInfoAddS'
DialogDemo.o(.text+0x248):DialogDemo.c: undefined reference to `DialogWindowShow'
DialogDemo.o(.text+0x264):DialogDemo.c: undefined reference to `DialogWindowExit'
DialogDemo.o(.text+0x278):DialogDemo.c: undefined reference to `TAP_Exit'
DialogDemo.o(.text+0x29c):DialogDemo.c: undefined reference to `DialogEvent'
collect2: ld returned 1 exit status
<builtin>&#58; recipe for target `DialogDemo' failed
make&#58; *** &#91;DialogDemo&#93; Error 1

> Process Exit Code&#58; 2
> Time Taken&#58; 00&#58;01
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
BobD
MyStuff Team
Posts: 4220
Joined: Wed Aug 03, 2005 12:21 pm
Contact:

Post by BobD »

Aren't regions meant to be dwords?
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

@BobD

Nice to know you are looking!

The wiki documentation says "int TAP_Osd_Create(dword x, dword y..."

looking at some source file I see "GetOSDRegionHeight (word Region)"

and OSDCopy is also using a word for the region

i.e. not dword (I guess int and word are interchangable size wise)

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
BobD
MyStuff Team
Posts: 4220
Joined: Wed Aug 03, 2005 12:21 pm
Contact:

Post by BobD »

I wasn't sure what size they compiled to, I just looked at my code side I couldn't see anything wrong with yours. Clearly mine is wrong but gets away with it!
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

Yours will work fine as you will only be using the low word of the dword.

Of course if it did require a dword then that could have been the cause of the problem.

Thanks anyway

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

I'm getting really confused now.

I've copied all the relevent bits of DialogDemo.c into my tap (fsCheck.c) and it compiles and links without errors.

I then renamed DialogDemo.c to *_old.c.
Copied fsCheck.c into DialogDemo.c and did a make (identical data in the Makefile to fsCheck apart from the change in the name). Make also performed using -B.

Get the same problem as before i.e. complaints about hardware_init_hook and missing Dialog* modules.

To summarize, it builds without issues when called fsCheck but fails when it is another name! (I tried calling it Demo.c as well!)

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

Ok ignore the above post.

Found that the makefile didn't have a "Demo: Demo.tap" line.
Also found that I had to use a different name for the target e.g. "DemoX: Demo,tap"

As least I can now build it properly.

Made similar changes to buildthe pukka Firebird DialogDemo.c
Unfortunately, this crashes the toppy so I'm no further on (I was hoping it would work and I could then make it look more like fsCheck to see what was causing it).
Adding InitTAPAPIFix() and InitTAPex() did not fix the problem.

Ho Hum.

Has anyone successfully managed to use the dialog routines in the Firebird library?

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

Geoff Bacon wrote:The max values were just used as an example ...
Was concerned it might be a bad example, but if you have tried other values then that is obviously a red herring.

EMJB
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

Geoff Bacon wrote: ..... Has anyone successfully managed to use the dialog routines in the Firebird library?
I'm pretty sure HDFW uses them, and they worked as designed, but not how I wanted, when I tried using them in CO.

EMJB
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
Geoff Bacon
Frequent contributor
Posts: 4663
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

Do you have a link to the HDFW sources; I've failed to find it (several attempts)

Perhaps we should take thisa offline?

Geoff
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
Post Reply