oricOpenLibrary by [raxiss]

Since we do not have native C compilers on the Oric, this forum will be mostly be used by people using CC65 or the OSDK. But any general C related post will be welcome !
User avatar
iss
Wing Commander
Posts: 1680
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

oricOpenLibrary by [raxiss]

Post by iss »

Hello, @all!

My oricOpenLibrary is available at github. Included are:
  • lib-basic - Executes BASIC and SEDORIC commands from C code.
  • lib-sedoric - Sedoric compatible load and save functions. (obsolette by lib-basic)
  • lib-ijk-egoist - IJK-egoist / IJK-joystick sample code.
  • lib-ttf - Library and tools for TTF rendering and use in Oric.
I hope you will found it useful.
As always feedback is highly appreciated!
User avatar
iss
Wing Commander
Posts: 1680
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: oricOpenLibrary by [raxiss]

Post by iss »

Some pics from the last added lib-ttf:
Attachments
Screenshot_20230329_212800.jpg
Screenshot_20230329_212737.jpg
Screenshot_20230329_212714.jpg
User avatar
ibisum
Wing Commander
Posts: 1758
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: oricOpenLibrary by [raxiss]

Post by ibisum »

Very nice work, thanks so much for sharing! This is a cheeky bit of code:

Code: Select all

#define basic(str)  {_basic_s=((char*)(str)),_basic();}
Why the , instead of a ;? .. Does this instruct CC65 to place the retval from _basic() into basic_r? If so, int-er-esting ..

EDIT: okay, I've read the rest of the library code, and I think it is very interesting where you are going with this .. I'm counting the days down until we have a text editor for the Oric, finally, worth using .. ;)

EDIT2: okay, you get even more points from me for the presence and purpose of the .lua files in this archive .. ;) BTW, load81-oric? :P
User avatar
jbperin
Flight Lieutenant
Posts: 487
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: oricOpenLibrary by [raxiss]

Post by jbperin »

Thank you very much Iss for sharing this library with the community.

That is undoubtedly a very valuable library for modern development on Oric. The code is neat, very readable. Very nice work !
And there are many things to learn from this code.

There are at least two things that I've allways wanted to understand and that I can better explore thank to this library:
- file loading/saving with sedoric .. (this lib seems to make things so simple .. from C or from BASIC).
- the IJK interface .. (very interesting example .. good starter for dummies C programmers).

Just to make sure I did understand what I read.
Are data defined here the result of assembling the driver in ijk-driver.s?
I like this way to make some assembly routines available from the BASIC

The TTF font rendering looks very cool. And that seems to be a very convenient and stylized way to display dynamically defined text on a hires screen. I wonder how it would behave if it is used over a previously loaded B&W image.

PS: I noticed that your data block definition in ijk-btest.txt ends with the french word FIN. :D Funny to see a french word here :)

Congratulation and thank you
User avatar
xahmol
Flight Lieutenant
Posts: 442
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: oricOpenLibrary by [raxiss

Post by xahmol »

Thanks. Again. The TTF addition is very interesting.

And without the other parts my Oric Screen Editor and Ludo would not have been possible, at least not in their present form.
User avatar
iss
Wing Commander
Posts: 1680
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: oricOpenLibrary by [raxiss]

Post by iss »

Guys, thank for the kind words - this is really motivating :D.
ibisum wrote: Fri Mar 31, 2023 12:42 pm ...
All headers may look bit unusual and wired but the reason for this is to be compatible with cc65 and osdk - the idea is to be used static variables for passing params and compiler independent return of result. (A:X vs. X:A).
jbperin wrote: Fri Mar 31, 2023 1:41 pmAre data defined here the result of assembling the driver in ijk-driver.s?
Yes, it's the same asm source compiled and converted to DATA.

About 'FIN' - yes, I use it frequently and mainly in asm sources. I don't remember which assembler was but it gives an error when I used 'end' as label (obviously it was treated as reserved word :) ).
User avatar
iss
Wing Commander
Posts: 1680
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: oricOpenLibrary by [raxiss]

Post by iss »

I've just updated my oricOpenLibrary with new item:
  • lib-romident - library for ROM identification using known crc32.
I hope someone will find it useful. 8)
User avatar
ibisum
Wing Commander
Posts: 1758
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: oricOpenLibrary by [raxiss]

Post by ibisum »

I hope someone will find it useful. 8)
For sure! LOCI support already, very nice! :)

Sure is looking like a lot of huge things are happening for Oric these days ..
Post Reply