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

Moderator: Technical

Post Reply
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

MckTop wrote:MpDisplay will not compile though because __cdecl is not defined.
I have a vague memory of running into that issue -- I think it was related to paths... possibly the include path being wrong, or the program PATH causing the wrong gcc intermediate executable to be picked up.
Can libraries (e.g FireBird) which have been compiled using gcc_for_TAP be linked with code compiled with topfield-gcc?
Ooh yes.
MckTop
Posts: 5
Joined: Thu Nov 05, 2009 10:21 am

Post by MckTop »

Still trying to get a working build of MpDisplay.tap using the gcc_for_TAP compiler and any help would be appreciated.

The root of the problem is that this tap includes file <ctype.h> of which there are three copies in the cygwin tree with numbers 2 and 3 being identical.

1. c:\cygwin\usr\include
2. c:\cygwin\usr\local\include\g++-3
3. c:\cygwin\usr\local\topfield-gcc\mips\include

The standard path settings for the gcc_for_TAP environment result in the copy from c:\cygwin\usr\include being used but this version is intended for use on microsoft\windows platforms and contains unresolved dependencies
(__cdecl and many others)

If the build is modified to include the version from topfield-gcc then the TAP compiles cleanly but crashes the toppy at boot time.

If ctype.h is deleted from the original sources, the TAP also builds cleanly but still crashes the toppy at boot time.

This looks like a silly build environment issue.

I can successfully build the example TAPs.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

Have you tried checking that PATH is correct? Try renaming the bin directory(s) of the Berlios executables to make sure those aren't being picked up.
bdb
Frequent contributor
Posts: 499
Joined: Tue Oct 18, 2005 10:50 pm

Post by bdb »

this works for me(but I don't use ctype.h):

Code: Select all

c&#58;\taps\test> mips-gcc -c -O2 -mtap -mlong-calls -msoft-float -I../tf_lib/include -I/cygdrive/c/cygwin/usr/include -I/cygdrive/c/cygwin/usr/local/include -I. test.c
c&#58;\taps\test> mips-ld test.o --script ../tf_lib/lib/tap.ld -L ../tf_lib/lib -l tap -l c -o test.elf
run from dos window
assumes cygwin is installed in c:\cygwin
assumes tap api is installed in c:\taps\tf_lib
assumes test code is installed in c:\taps\test
assumes dos path includes c:\cygwin\bin;c:\cygwin\sbin;c:\cygwin\usr\local\bin
assumes gcc_for_TAP compile installed in /usr/local
i.e. which mips-gcc
returns:
/usr/local/bin/mips-gcc

- note that gcc is awful, when gcc is compiled it hard codes the search order it uses to find the default libraries/include files into the executable ... this build of gcc expects it to be installed in /usr/local

- ensure your gcc is installed in the correct location.

bdb

-bear in mind there is a bug that causes taps to crash on load if the binary is an exact muliple of 512
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

This site has a generic trojan on it, according to mcaffee site advisor.
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

What site do you mean by "this"? Berlios.de or toppy.org.uk?
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

Only if you download and install one of the many open source binaries hosted on berlios. Sourceforge.net also flags a few warnings but passes overall. Nothing to worry about for anyone downloading the compiler.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

Odd the instructions for installing cgywin, bear not relation to the documentation?

It skips all the first wizard pages, then talks about selecting components to install. I don't see that at all in the installer, I just get install from local folder, download without installing and install from internet.

Its a bit old this software looks like it was written for windows 98.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

I get

1. Welcome
2. Choose a download source, I pick Internet
3. Select root install directory, I choose C:\cygwin, it wont accept program files
4. Select local package directory, I choose my documents\downloads\cygwin
5. Select your internet connection, I choose direct
6. Choose a down load site, I select http://cgywin.mirrors.hoobly.com.

but the instructions say

http://tap.berlios.de/cygwin_setup.html
TAP Project - Cygwin setup wrote: Cygwin, including documentation is available from http://www.cygwin.com/. You can either visit the Cygwin page and install using the link found there, or just use the link provided here.

Your Cygwin installation can be maintained using the same setup program that is used to install Cygwin. This setup program can be used to update, install and uninstall the various Cygwin components.
First we make a local copy of the Cygwin setup program.

1. Right click on the install Cygwin now icon and choose to save the file to your local disk.
2. Name the file CygwinSetup.exe


Install
Cygwin
now
# Double-click CygwinSetup.exe to start the installer.
# Navigate through the preliminary questions by using the NEXT button until you get to the screen where you select which packages are installed, skipped, upgraded or uninstalled.
# Click on the VIEW button to get a full view of all packages.
# Ensure that at least the following packages are selected (having additional packages selected is OK):
I should see that page before downloading shouldn't I.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

BlueSky wrote:Odd the instructions for installing cgywin, bear not relation to the documentation?
Not particularly odd. 4 years is a very long time in computer science.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

Well I got past the install from mirror site and got a list of packages. They all had +'s by them except the root, so I clicked next without changing anything.

I have the cgywin folder structure but no files???

Any idea what happened.

Can't Topfield just use Visual Studio express. This Unix stuff is confusing me.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

BlueSky wrote:Can't Topfield just use Visual Studio express.
I'm sure that's great for making applications that run on Windows machines. But making TAPs requires a cross-compiler that runs on your PC (probably Windows, probably x86) but makes code for the Toppy's MIPS processor and in the specific TAP format the Toppy requires.
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

:lol: The Toppy doesn't have an x86 inside it! It's MIPS based so Microsoft's compiler isn't going to be any use.

Ignore all the stuff in the instructions about using the bash shell to build stuff. If you want to use VC Express as your text editor, you can create a makefile project that uses the Cygwin make tool. Alternatively, Notepad++ or Programmers Notepad does a good job.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

Finally worked out how to setup cygwin phew. I don't think Topfield tap writing is going to appeal to someone, who just wants to record their telly programs from a machine they picked up from argos. :lol:

Maybe Microsoft could release Topfield.NET or more likely Topfield could release a .NET windows app that can build taps.

Is it me or are Topfield doing an awful lot on the cheap. I mean their MHEG is open source code, their TAP development is some free compiler and unix virtual machine.
Post Reply