Tap2Exe?

Anything related to the tools Tap2Wav, Tap2CD, Tap2Dsk, Sedoric Disc Manager, Tape Header Creator, WriteDsk, and generaly speaking tools related to the management of Oric data files and devices.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Tap2Exe?

Post by Brana »

I wonder was there ever developed such a tool (Tap2Exe)?

In short, idea is to convert a BASIC program (TAP file) to stand-alone EXE file, that can be executed on Windows-based machines (without anything else?)

There have been some rather good "bas2exe" converters (for Qbasic), but I wonder - was there ever such a thing developed just for (Euph)Oric?
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Yes and no.

There's been Basic compilers (compiling a BASIC program to a machine code program), but that's Oric to Oric.

Oric to PC can be done using an emulator pre-packaged with the program, and they indeed have that on Spectrum.

Guess you could do a custom version of Oricutron with a preloaded tape ;)
User avatar
norik
1st Star Corporal
Posts: 15
Joined: Wed May 24, 2006 8:46 am
Location: ZZ9 Plural Z Alpha, Earth, Armenia, Yerevan
Contact:

Post by norik »

from time to time I think about developing Oric Basic compiler to native, or via C/pascal to native.
The question is there are a lot of basic programs with machine code in DATA strings, and they then do CALL to execute machine code part.
This needs an emulator or leads for idea of 6502toC or something like that.
jotd
2nd Star Corporal
Posts: 28
Joined: Sun Feb 03, 2008 3:24 pm
Location: France
Contact:

Re: Tap2Exe?

Post by jotd »

Hi

I have done some conversions of oric games to c+sdl some time ago (xenon, zorgon, zebbie) using a disassembler and some awk scripts and a 6502 c library.
It needed a great deal of adaptation because only graphics were emulated.

I m currently developping a bas2c utility to convert tap to basic text and basic text to c

I m making good progress even if the basic to c converter is a hell of a challenge

Most of the stuff is currently supported except the impossible:
- variable goto & gosub
- pop

There s a runtime for all basic functions!! I can create fully filled circles without the swiss cheese effect!!

The idea is to convert 95% of the stuff and leave the compiler or runtime signal bugs. Adaptation will be necessary for the last steps.

I intend to convert some adventure games first.

It could also be used to convert Basic to C and then compile it with CC65 and link it with the real C binding for the oric (if memory allows) to create accelerated versions of some good but slow games (l'Aigle d'Or comes to mind for instance)

Regards
-

JOTD
User avatar
Hialmar
Flight Lieutenant
Posts: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Tap2Exe?

Post by Hialmar »

I'm working on l'Aigle D'Or personally with some code from JOTD (again thanks a lot).
But my progress is slow so if anyone want to help they are welcome.
Your tool, Jeff, would be most welcome indeed.

I plan to translate all the text to English as well so that non French speakers can enjoy the game.
Hialmar
CEO and Silicium member.
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: Tap2Exe?

Post by Godzil »

Making full basic apps working on another computer is not that hard, just need to write another token interpreter.

But for full Assembly (or C) app, or worst, app mixing basic and asm, is something that may start to be challenging. But I'm pretty sure it's not that hard in fact.

I should add this in my FIFO project stack :)
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Tap2Exe?

Post by peacer »

Oric is pretty lack of PC-Based software.

So far, other than excellent emulators, the only PC program which has multiple features helping programmers is Oric-Explorer but its not updated for a long time.. Symoon's PCHIRES is another example too..

A PC-based Basic editör other than emulators might be most helpful

Think about an utility using notepad-like enviroment, using mouse and PC's copy-paste advantages.. This is not a challenging and diffucult program to build for a trained pc-programmer. It does not have to interprete whole the code. ıt might pass the output to emulator when run.

Another biggest need is -as you know- pc based graphic editor which is wanted for a long time, even Twilighte's dream.. Think of HIDE for PC which is able to load PC graphic formats like GIF, PNG, JPG etc. and you edit this with mouse, optimise it with pictconv routines. Or a character generator which can produce sprite data maybe..

I have no such extended abilities to build these kind of programs unfortunately.. But I am sure, such utilities might expand Oric games & software Corpus..
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Tap2Exe?

Post by coco.oric »

Another biggest need is -as you know- pc based graphic editor which is wanted for a long time, even Twilighte's dream.. Think of HIDE for PC which is able to load PC graphic formats like GIF, PNG, JPG etc. and you edit this with mouse, optimise it with pictconv routines. Or a character generator which can produce sprite data maybe..
i think this type of software is on going.
french people are working on an oric'graph on pc.
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Tap2Exe?

Post by peacer »

Really? I didn't know that! Great news :)

Is there a place where I can follow the development of this project? I googled about that and reach nowhere..

Edit : I think I found about that. Is that right?
http://forums.oric.org/t141-outil-de-de ... eloppement

The idea of that program is to regenerate the drawn image with basic commands.
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Tap2Exe?

Post by coco.oric »

Yes, it's the good forum information
The idea of that program is to regenerate the drawn image with basic commands.
Yes, it was the first idea of the author. I've discussed about it with him.
I've tried to adapt his code with the HIDE objective. Maybe the Greg will realized it better and quicker than me.
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Tap2Exe?

Post by peacer »

Agreed. HIDE interphase could be much more useful.

But I hope, abilities of pictconv and libpipi are added too. These conversion algorhythms create very nice results but usually little retouches are needed. Instead of drawing a picture from the scratch, the utility should load a picture from PC, convert it to oric-style screen and let us edit it with HIDE-like interphase..

When I am creating a picture for the Oric, first I load the picture with modern times graphic editor like paintshop etc. Then I resize it to 240x200 and decrease the colour palette to 8 with predefined oric colors. Then I load that picture with libpipi, convert it to tap image, open oricutron, load HIDE and edit & retouch it under oric emulation.. So diffucult steps..

Maybe creating such an utility is too diffucult for one person but collaboration with creators of pictconv might be needed..

The idea might be utopic but I hope it would come true one day :)

Orixel seems to be really really effective program and gave me hope for such advanced programs ...

I have another suggestion with Orixel if its going to use BASIC conversion. Instead of creating many lines of DRAW, CURSET, CURMOV, CIRCLE commands, the code can be simplified and shortened by graphic drawing data. For example

Code: Select all

5 HIRES
10CURSET115,97,3:CIRCLE51,1:CURSET75,68,1:DRAW81,0,1:DRAW0,59,1
20DRAW-81,0,1:DRAW0,-59,1:CURSET110,99,3:CIRCLE27,1:CURSET110,74,1
30DRAW-24,29,1:DRAW45,12,1:DRAW-20,-43,1
40 W=6:T$="Oric":CURSET105,133,3
50FORI=1TO LEN(T$):CHAR ASC(MID$(T$,I)),0,1:DRAW W,0,3:NEXTI

INSTEAD

Code: Select all

5 HIRES
10 READ C$
30 IF C$="S" THEN READ X,Y,FB:CURSET X,Y,FB:GOTO 10
40 IF C$="M" THEN READ X,Y,FB:CURMOV X,Y,FB::GOTO 10
50 IF C$="C" THEN READ X,FB:CIRCLE X,FB:GOTO 10
60 IF C$="D" THEN READ X,Y,FB:DRAW X,Y,FB:GOTO 10
70 IF C$="T" THEN GOSUB 83 :GOTO 10
75 IF C$="F" THEN READ X,Y,X1,Y1,C:CURSETX,Y,3:FILL X1,Y1,C:GOTO 10
80 END
83 READ T$,X,Y:CURSETX,Y,3
85 FORI=1TO LEN(T$):CHAR ASC(MID$(T$,I)),0,1:DRAW 6,0,3:NEXTI
87 RETURN
90 DATA S,115,97,3,C,51,1,S,75,68,1,D,81,0,1,D,0,59,1
100 DATA D,-81,0,1,D,0,-59,1,S,110,99,3,C,27,1,S,110,74,1
110 DATA D,-24,29,1,D,45,12,1,D,-20,-43,1,T,"Oric",105,133
120 DATA END
For easy drawings there's no problem but think of hundreds of lines with cursets, curmovs etc, such simplification really shorteN the resulting code.
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: Tap2Exe?

Post by Godzil »

Not shorten, but make it really faster

edit: I was meaning that the original writing will produce faster code..
Last edited by Godzil on Wed Aug 27, 2014 1:26 am, edited 1 time in total.
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Tap2Exe?

Post by Dbug »

It's basically what I did to draw the TRON logo in Cyclotron:
Look for Intro_TronLogo_Description in the source code

I a tool has to generate instructions, why not generate assembler code instead of BASIC :)
User avatar
Symoon
Archivist
Posts: 2301
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Tap2Exe?

Post by Symoon »

I think one of the main goals of Orixel was to reduce the memory size of pictures, by recreating them with instructions instead of saving 8k of Hires screen. It's slower but uses less memory.
BTW that's why I made some compression tries a while ago, to see if we could find something even more efficient - but that's another subject.

@Peacer: your code is not really shortenend in memory, as in memory basic instructions (CURSET, DRAW, ...) are stored on a single byte.
jotd
2nd Star Corporal
Posts: 28
Joined: Sun Feb 03, 2008 3:24 pm
Location: France
Contact:

Re: Tap2Exe?

Post by jotd »

Godzil wrote:Making full basic apps working on another computer is not that hard, just need to write another token interpreter.

But for full Assembly (or C) app, or worst, app mixing basic and asm, is something that may start to be challenging. But I'm pretty sure it's not that hard in fact.

I should add this in my FIFO project stack :)
I can do that since I have developped both BASIC to C and 6502 to C converters and run-time libraries.
And will help to convert l'Aigle d'Or now that my BASIC2C tool is complete.

That would be cool also to reinject l'Aigle d'Or C code in a real Oric for fast operation (original game is soooo slow)

First application that you can test and download (with source & conversion tool): House Of Death.
To follow: Le Manoir du Dr Genius (completed too)

http://jotd.pagesperso-orange.fr/

(And BTW creating a BASIC to C converter was quite challenging actually, well at least for me.
I had to create a lexer, but also some simple tree & grammar)
-

JOTD
Post Reply