I did find these resources:
http://oric.free.fr/DISKS/sedoric.html
This gives a nice English SEDORIC manual. Alas it is very sparse in syntax samples of the added BASIC commands.
https://www.defence-force.org/computing ... /index.htm
This is much more extensive, also giving some syntax samples. But would still love to see more samples as not everything is clear to me. The French language also does not help. Can follow it mostly in French, Google translate helps a bit for the rest (although it confuses more often than clarifying), but some bits I just can not get to work (see below).
I also see that both seem to describe rather old SEDORIC versions. Also would like to understand the differences between SEDORIC versions 1, 2, 3 and 4. Especially in the added BASIC commands.
Any suggestions?
Longer background
At the moment I am busy with a project porting one of my old Commdore 128 BASIC7 listings (written in 1992) to the Oric.
The listing is a port of the Ludo game. So nothing groundbreaking, just a fun excercise. But did see that the Software archive on Oric.org actually only lists one Ludo clone under that name which is not downloadable, so maybe it actually does add something. Will share source of course if I am confident enough to share it.
I obviously encounter some nice challenges, the most obvious ones being:
1. The biggest one: the C128 has 80 colums screenwidth instead of just 40 on the Oric. Need for some serious rework on screendesign therefore;
2. I used user defined charsets on the C128 for the graphics. Obviously can do the same on the Oric, but converting 8x8 pixel based charsets to 6x8 pixel based charsets gives need for compromises. As also the screendimension is 40 width instead of 80, graphics need to be rededigned anyhow;
3. On my C128 listings of that time, I borrowed some windowing routines that made a menu and windowing system by basically storing the screen in the upper 64k RAM bank (that was mostly unused by BASIC anyhow), plotting the menu and restoring the screen to remove the menu. Menus could get up to three 'deep', meaning three full screen dumps stored in memory. Obviously such ample memory space to store up to three screendumps would be an issue with the memory size of the Oric. So need to find an alternative.
4. Obviously the BASIC dialects differ: Commodore BASIC 7.0 is actually not that different from Oric Atmos BASIC and while some commands are not exactly the same, similar commands exist. For example DO...WHILE (C128) becomes REPEAT...UNTIL (Atmos). But what gives my biggest search for alternatives right now have been INSTR (to search in a string) and RESTORE Linenumber, which both do not exist in standard Atmos basic.
5. Another big challenge is screen printing and especially using colors. Replacing al those nice Commodore cursor steering characters and color characters to print@ and CHR$(27) sequences is doable, just cumbersome. So far no issue. But something that I completely had forgotten from my old Atmos days is that changing paper and color via CHR$(27) sequences and PRINT@ changes the color for the remainder of the line. Which is a headache if you are printing a pop-up window over existing graphics. Have to find solutions for that or ways to minimize the impact (such as placing popups only completely to the right of the screen as much as possible).
I think I am able to solve the charset issues and the screen dimension issues myself with some trial and error and manually converting each char of the C128 charsets to the Oric charset and the Oric alternative charset.
In my search I found that SEDORIC actually provides some additional BASIC commands that promise to help me with some of the other issues. Managed to figure out some, but others I can not get working whatever I try.
Which is ideal, as I use a Cumana Reborn so wanted to create my program with disk support using SEDORIC anyway.
My present coding workflow is to copy paste and adapt the BASIC sources in VS Code on my PC and building the BASIC source to a SEDORIC disc using OSDK. Testing on Oricutron before I transfer to my real hardware.
Editing the character sets with https://forum.defence-force.org/viewtop ... 638#p22638
INSTR:
This one I actually did figure out. Was clueless with the English manual before, but the more extended French one learned me that I needed to use the IN variable to find out the position of one string in another string.
I used this to translate a character input routine waiting for a key pressed that corresponds to a character in an input string like this. Works, to be added is joystick support later but no clue yet how to do that and can not test that either as my joystick support options for the Atmos are in pre-order still.
Code: Select all
15360 REM "--- ASK FOR KEYPRESS OR JOYSTICK ---
15370 :
15380 REPEAT
15390 : GETAW$: INSTR TT$,AW$,1
15400 : REM PLACEHOLDER FOR READING JOYSTICK, TO BE ADAPTED LATER
15470 UNTIL IN>0
15480 RETURN
First I got excited by seeing the CREATEW and WINDOW commands listed as new, as that looks like something to use as subsitute for the C128 windows routines I use. From both manuals I do only not understand exactly what these commands do, what to use them for and how to use them with what syntax. My trial and error attempts either did nothing or gave syntax errors.
Then I thought that, if I obviously can not use internal RAM to store anything above three screens, I might just save the screens to disk if I use disk anyway. Cheating maybe, but with flash on my Cumana Reborn it is probably also quick enough.
And voila, SEDORIC has an additional command to store screens to disc, ESAVE.
So now did this, the AD variable being the adress counter variable in my C128 routines originally, that I now use as screen counter just starting at one:
Code: Select all
15030 REM "--- SAVE SCREEN ---
15040 :
15050 ESAVE "LUDOSCR"+STR$(AD): AD=AD+1: RETURN
15060 :
15070 REM "--- LOAD SCREEN BACK ---
15080 :
15090 AD=AD-1:LOAD "LUDOSCR"+STR$(AD): DESTROY "LUDOSCR"+STR$(AD):RETURN
15100 :
And still searching for a solution that if I print anything in my pop-op menu in different colors than the background of that menu, everything after any menu line becomes the colors used in the last time I changed color in that menu line. Of course that is solved by loading the original screen back after the menu is closed, but it is a nuance aesthetically for the time the menu is showed.
RESTORE to linenumber
Not a big issue, but my original listing reads DATA lines not in the order that those DATA lines are present by pointing to those datalines with RESTORE linenumber.
Did not chose to to this deliberately, but was caused as the windowing routines have been borrowed from work from somebody else, including the DATA lines used for the menudata.
As all data is only read once as far as I know, in principle I can easily solve this by reordering the READ statements in the proper order of the DATA lines. Less clumsy code anyhow.
But SEDORIC listing RESTORE linenumber as additional command triggered me to actually use this instead.
However, regardless the syntaxt I try, the only thing I get is SYNTAX error. Any ideas?
Tried RESTORE 16670 , RESTORE16670 and RESTORE (16670). And 16670 is an existing line number with a DATA statement (which according to the SEDORIC manual is not even mandatory).
Sequential file handling
Did not come to conversion of this part yet, so do not know yet if I will figure this out correctly myself or not. The C128 listing uses sequential files on disk for save games.
But also samples on how to best use the SEDORIC commands for sequential file creation, manipulation and reading would be welcome.
Any ideas, suggestions and pointers to additional resources are welcome!
Also feel free if you have way better alternatives to do stuff I am trying to do. Apart from converting my listing to C or assembly Want to start simple with BASIC to BASIC first.