dflat language update

This is the best place to discuss about the various Oric operating systems like Sedoric, Randos, FT-Dos, and others, as well as serious software, utilities, word processors, disassemblers, etc... that runs on oric computers.
User avatar
xahmol
Flight Lieutenant
Posts: 437
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: dflat language update

Post by xahmol »

6502Nerd wrote: Mon Mar 08, 2021 4:56 pm although I do note it's rather picky about what hardware is needed..
True alas, and more disturbing: no way to predict up front yet. It is just try and see if it works (which by the way the maker is very transparent about).

Will have a look if time permits. Only my problem is that because of my limited knowledge of dflat technically, the fact that I am still a beginner experimenting with the Twilighte board and the fact that the board is still in very active development on the software side with not all things stable yet, I do always struggle finding out if something is really not working or if it is just myself doing something wrong.
So if you, or someone else reading here, gets it to work, please let me/us know.
User avatar
6502Nerd
Pilot Officer
Posts: 111
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

dflat - version 0.12

Post by 6502Nerd »

xahmol wrote: Mon Mar 08, 2021 5:30 pm
6502Nerd wrote: Mon Mar 08, 2021 4:56 pm although I do note it's rather picky about what hardware is needed..
True alas, and more disturbing: no way to predict up front yet. It is just try and see if it works (which by the way the maker is very transparent about).

Will have a look if time permits. Only my problem is that because of my limited knowledge of dflat technically, the fact that I am still a beginner experimenting with the Twilighte board and the fact that the board is still in very active development on the software side with not all things stable yet, I do always struggle finding out if something is really not working or if it is just myself doing something wrong.
So if you, or someone else reading here, gets it to work, please let me/us know.
No problem, whenever you have time etc. I don't have a board but looks like it's possible to try under emulation - so when I have some time I will look in to this and see what needs to be done (if anything) for dflat to work. I am hoping that the board can just hand control to one of the ROM slots, in which case it's very easy to run dflat - but then how to take advantage of the fast loading/saving will be also good/important to have.
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: dflat language update

Post by iss »

Thanks for the update!

Unfortunately the 'cls' command continues to write in to ROM space.
After some quick debugging I found that on first call to 'gr_cls' the 'gr_scrngeom+gr_text_h' (at $1a) contains 0 instead of 40 (i.e. #columns). This is skipped by initialization. So I've added 'db gr_text_w, 40' (in file Oric-DFLAT/vdp/graph.s line #199) and now everything seams to work ;).

Additionally, I've excluded the file 'printer_out.txt' - it contains nice spoiler indeed! :twisted:

Here is the pull request: https://github.com/6502Nerd/dflat/pull/2

Else, great work and congrats! I hope to show soon why I wanted the 'ROM writting' fixed ;) ....
jede
Flying Officer
Posts: 191
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: dflat language update

Post by jede »

xahmol wrote: Mon Mar 08, 2021 3:17 pm Still following this thread with interest!
Quick question: would it be possible/easy to have dflat as ROM for the Twilighte board/Orix using this? http://orix.oric.org/build-a-rom-for-orix/
(background on Twilighte board: http://orix.oric.org/twilighte-board-v0-6-user-manual/

Because if possible, that would actually be a very easy way to use it on real hardware (provided you have an Atmos that works with the Twilighte board, which still seems very random. For me, one Atmos works, one Atmos very unstable)
Hello :)

You can load easily the rom in a twilighte board bank. There is a bug in the current version of "bank" binary, but i can provide a debugged binary if you want. The bug is fixed here, but the update will be released next month.

Anyway, it means that loading will work with real tape file, because rom is not coded to write/read on sdcard/usbdrive.
Last edited by jede on Mon Mar 08, 2021 9:05 pm, edited 1 time in total.
jede
Flying Officer
Posts: 191
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: dflat - version 0.12

Post by jede »

6502Nerd wrote: Mon Mar 08, 2021 4:56 pm
xahmol wrote: Mon Mar 08, 2021 3:17 pm Still following this thread with interest!
Quick question: would it be possible/easy to have dflat as ROM for the Twilighte board/Orix using this? http://orix.oric.org/build-a-rom-for-orix/
(background on Twilighte board: http://orix.oric.org/twilighte-board-v0-6-user-manual/

Because if possible, that would actually be a very easy way to use it on real hardware (provided you have an Atmos that works with the Twilighte board, which still seems very random. For me, one Atmos works, one Atmos very unstable)
I also noticed that it is possible to try this board under Oricutron emulation - I will have a look at this too!
Thanks for your interest :-)
It's a long time i did not updated the rom in oricutron repository ... You can download last rom here (mainly kernel and shell) :

http://repo.orix.oric.org/dists/official/tgz/6502/

here is how it starts on real hardware, i loaded rom in a ROM slot. I can easily load it on ram slot too.

User avatar
xahmol
Flight Lieutenant
Posts: 437
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: dflat language update

Post by xahmol »

Looks great Jede!
So how do I do that, which file to place where?
User avatar
6502Nerd
Pilot Officer
Posts: 111
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: dflat - version 0.12

Post by 6502Nerd »

jede wrote: Mon Mar 08, 2021 9:04 pm It's a long time i did not updated the rom in oricutron repository ... You can download last rom here (mainly kernel and shell) :

http://repo.orix.oric.org/dists/official/tgz/6502/

here is how it starts on real hardware, i loaded rom in a ROM slot. I can easily load it on ram slot too.

Wow, that's brilliant! I wonder how save and load would work on this.. I suspect without patch information then the board would not know to intercept calls to the tape routines and so real tape input/output would be the result?

The dflat.rom and dflat.pch files were updated this evening because iss found another bug (thank you) - not serious, but good to get rid of it and actually saved a few bytes too.
jede
Flying Officer
Posts: 191
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: dflat language update

Post by jede »

xahmol wrote: Mon Mar 08, 2021 10:02 pm Looks great Jede!
So how do I do that, which file to place where?
I can explain, but you will not able to launch the rom with the current version 2021.1. It will be fixed in 2021.2 version, next month :) But you can have a look to manual and orixcfg part (to load rom)
jede
Flying Officer
Posts: 191
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: dflat - version 0.12

Post by jede »

6502Nerd wrote: Mon Mar 08, 2021 11:24 pm
Wow, that's brilliant! I wonder how save and load would work on this.. I suspect without patch information then the board would not know to intercept calls to the tape routines and so real tape input/output would be the result?
Yes it missed this part, but i think that it's not complicated, because we did it in others roms. And yes, input/output will be on real tape. But, it's possible to convert it.

There is two ways to do ROM on the board :
1) Orix rom : it means that the ROM is recognize by the kernel, and the rom can provide commands as "dflat" (and args if you want)
2) Standalone ROM : in that case, we load it into a bank, and we call the id of the bank (that is why you see "bank 1", because i asked system to launch bank one (that is why we can load any rom and start it)
User avatar
xahmol
Flight Lieutenant
Posts: 437
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: dflat language update

Post by xahmol »

jede wrote: Mon Mar 08, 2021 11:38 pmI can explain, but you will not able to launch the rom with the current version 2021.1. It will be fixed in 2021.2 version, next month :) But you can have a look to manual and orixcfg part (to load rom)
Super!
User avatar
ibisum
Wing Commander
Posts: 1645
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: dflat language update

Post by ibisum »

Wow, this opens up a whole new world of possibilities with dflat now, right? Gotta add bank switching, and suddenly you've got up to 512k to play with?

Maybe there'd be enough space now, to add DOS support to dflat? This is the one thing that gives me pause so far ..
User avatar
6502Nerd
Pilot Officer
Posts: 111
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: dflat language update

Post by 6502Nerd »

ibisum wrote: Tue Mar 09, 2021 7:52 am Wow, this opens up a whole new world of possibilities with dflat now, right? Gotta add bank switching, and suddenly you've got up to 512k to play with?

Maybe there'd be enough space now, to add DOS support to dflat? This is the one thing that gives me pause so far ..
For my homebrew computer, I have a 64K ROM, which is bank switched (16KB banks) through port pins on one of the 6522 VIAs. One of the banks is for SD card and DOS FAT16 handling (although I can distribute code across banks how I want during build).

It is written for 65c02, but as I did for dflat, the conversion to 6502 should be easy enough. FAT16 is good enough generally - still supported on Windows so for example I can copy files from PC to SD card and then that card is readable by my homebrew computer and vice-versa.

A thing I spent some time on is how to make cross-bank calls - I came up with a specific approach which provides an easier programming model, but relies on being able to switch banks through software (also the SD Card SPI is driven through additional VIA pins). If this board allows software to do switching and driving the SD Card, then I am sure I can adapt it :)
User avatar
6502Nerd
Pilot Officer
Posts: 111
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Some episodes and Lander game using dflat

Post by 6502Nerd »

Hello, I hope everyone is well!

I have been making some updates to dflat - mainly small additions and some bugs found that needed to be fixed.
I also made some videos on YT explaining how to program a simple Lunar Lander style game in dflat. I start off using only dflat, but the final video shows how to add a little bit of inline assembler to make the game a bit smoother.

I think even without any assembler, dflat works quite well considering it is in hires mode and interpreted on our little 1MHz machine :D

The YT channel about dflat is here, including contributions by iss and rax : https://www.youtube.com/playlist?list=P ... OTc4_Q7e5c

Post Reply