CPCWiki forum

General Category => Programming => Topic started by: GUNHED on 22:45, 01 December 20

Title: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 22:45, 01 December 20
Today we start the FutureOS Programming Contest

Prices:
1. 200 Euros
2. 100 Euro
3. LambdaSpeak FS (not yet available - the final chapter)4. 50 Euros

Maybe additional prices will be donated.

Submission date: 1.12.2021 (one year to go)

How can you participate? Well, just program something. Examples:
- Game
- Application
- anything else, as long as it runs with FutureOS

Informations you can get at www.FutureOS.de (http://www.FutureOS.de) or right here (post or PM)  :) :) :)

How will the winners be determined?
- We let all the CPC users decide


Any questions? Anything else?
Right here please.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 19:28, 02 December 20
The first participant is Slartibartfast. He is coding a game.


Everybody else is welcome to join the contest. Of course you can even 'join' at the last day of the contest, in case you don't want to have pressure on yourself too much.


Good luck and much fun to everybody!
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: zhulien on 07:48, 04 December 20
I wonder if someone would create a BASIC shell for futureos?  and a CP/M shell?
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: funkheld on 12:38, 04 December 20

fotureos currently only works with asm.


cannot be handled as easily by a normal programmer as we are. therefore futureos is not for us if we want to program something.


greeting
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: Sid_ on 13:15, 04 December 20
You can code in c language also.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: funkheld on 20:44, 04 December 20
then show me a demo in c for futureos and with which c compiler?   8) 

and then start the demo program in futureos

where are the lib and include for futureos in the c compiler?


greeting
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: AMSDOS on 02:11, 05 December 20
then show me a demo in c for futureos and with which c compiler?   8) 



I wrote 2 (Star Scroller & Bouncing Ball) using Small-C with the FIOLIB in 2013:


https://www.cpcwiki.eu/forum/programming/futureos-corner/msg66182/#msg66182 (https://www.cpcwiki.eu/forum/programming/futureos-corner/msg66182/#msg66182)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: funkheld on 17:01, 05 December 20
hello thanks.


which one  :  Small-C ?
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 14:42, 06 December 20
I wonder if someone would create a BASIC shell for futureos?  and a CP/M shell?
Indeed a simple kind of BASIC would be a cool idea and probable a doable entry.


fotureos currently only works with asm.cannot be handled as easily by a normal programmer as we are. therefore futureos is not for us if we want to program something.


Quite in contrast, to code something for it in ASM is more simple then anywhere else. Some reasons:
- You can use the complete RAM from 0 to &A000 (up to &B800 if needed)
- You can use all RST vectors for you own program
- You can use the &0038 Interrupt vector and the &0066 vector the way you want
- You can use all registers, of course the second register set too.

To have OS functions be split in four different ROMs may be a new concept, but in reality it's simple. Just switch the ROM on and call the OS function. Done.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 14:49, 06 December 20

I wrote 2 (Star Scroller & Bouncing Ball) using Small-C with the FIOLIB in 2013:


https://www.cpcwiki.eu/forum/programming/futureos-corner/msg66182/#msg66182 (https://www.cpcwiki.eu/forum/programming/futureos-corner/msg66182/#msg66182)


Thanks for mentioning that.  :) :) :)  Maybe FIOLIB need an update for SDCC or something like that. That would actually be a great project too.


Of course I'm here to help everybody with all entries / projects.  :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 20:29, 07 December 20
In addition there probably will be a hardware price too. An new expansion, I'll let you know when time is right. :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 16:50, 11 December 20
We have only one entry up to now. Even the smallest additional entry will win!  :) :) :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 15:02, 10 January 21
Dear coders...

If you plan to do something for the CPC / Plus then just adapt it for FutureOS and contribute to this nice contest. Your gain: You will win a price. Our gain: Your great work.

Of course I will always provide support for anything just in case the 500 KB of documentation are not too well written (which is sometime the case for somebodies own projects, even an OS).

 :) :) :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: m_dr_m on 03:16, 18 January 21
Great initiative! Not sure about the prices though :)  I don't think potentially interested CPCists are drawn to money.
Maybe some rare goodies would be appreciated? E.g. A Symbiface 2.5 or a balloon from KlassenTrefen.


The visual text-diff project would be very sweet to resurrect.
Also, a little shell with file-search facilities would make my day. To dig into the archives.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 21:58, 18 January 21
Well, price #4 is a special blue LambdaSpeak FS (they are not available yet, but in testing phase).

Somehow it's amazing how much participants they got in spain - for money prices.

Right here I wished we would have more participants than prices.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: roudoudou on 10:12, 20 January 21

is there a "good to know" manual or "don't do that!" manual in order to make a clean coding?
i opened an API manual and i understand there is system values in the screen area?  :o

Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 18:15, 20 January 21
is there a "good to know" manual or "don't do that!" manual in order to make a clean coding?
i opened an API manual and i understand there is system values in the screen area?  :o
Well, not it's in the ROM area, your API entries are in the area of &FF00 to &FFFF (upper page). This area is equal in all FutureOS ROMs.

In the download section of www.futureos.de (http://www.futureos.de) there is the manual, the API manual and OS functions explanation for all four OS ROMs. Also you have a "how to start" guide and examples.

Please feel free to ask for coding examples right here. I'll support of course.  :) :) :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 20:01, 20 January 21
Well, what are the advantages of FutureOS

- You're free in using the machines hardware. For example all RETs are yours, the 2nd register set can be used fully anytime. Free selection of interrupt mode and. Ints and NMIs are yours too.
- Free RAM from 0 to &A000 and as long a you don't load/save files you can use RAM up to &B800 too.
- Memory management for 16 KB blocks between &4000 and &8000
- Very quick OS functions
- Support of many hardware expansions.

So, it's ideal for games, demos and bigger applications.
Hope that some people are interested, because this is made for you all.  :) :) :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 17:08, 19 February 21
Just an idea: For the LambdaSpeak there is a nice software library. It would be pretty to see somebody doing something for the FutureOS programming contest and the LFS.
If you're interested, let me know, I will provide the hardware (LambdaSpeak FS).
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 03:12, 26 February 21
One idea for the programming contest for FutureOS.


It would be nice to see an application which is capable to download OS updates from the internet.
I would help to burn the new ROMs.
You would write something to download the ROMs - using the M4 card or the SF3.
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 14:55, 11 March 21
Just a reminder, let's be creative and participate here.

Support is provided in many ways.

Corona time = programming time!  :) :) :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: SRS on 23:03, 15 March 21
About SDCC and FutureOS, GUNHED knows my troubles :)
I hereby give y'all my try of a helloworld in C/SDCC with source, comp.bat , *.dsk and no idea why i can't get it to compute under FOS :)

C-CODE
Code: [Select]
//Helloworld FOS

#define RAMCHAR #0xB847 //located in first 64 KB RAM
#define TERM_2 #0xD48C     //located in ROM A (Textausgabe)
#define KLICK #0xFE9A     //located in ROM D (R├╝cksprung in den Desktop)
#define ROM_D #0xFF12     //located in all ROMs



void init_FOS()
{
__asm

    ld bc,(#0xFF01)
    out (c),c
    ld bc,#0x7F82
    out (c),c
    ld (RAMCHAR),bc
__endasm;
}

void exit()
{
__asm
    ld hl,KLICK
    call ROM_D
__endasm;
}


void prints(char *text) __z88dk_fastcall
{
 __asm
   call TERM_2
 __endasm;
}


void main()
{
    char* test = "\x1E\x15\x1aHallo FOS-WELT vom SDCC!";
   
    init_FOS();
    prints(test);
    exit();
}

Assembly from SDCC:
Spoiler: ShowHide
   
Code: [Select]
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.0.0 #11528 (MINGW64)
;--------------------------------------------------------
    .module helloworld
    .optsdcc -mz80
   
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
    .globl _main
    .globl _prints
    .globl _exit
    .globl _init_FOS
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
    .area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
    .area _INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
    .area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
    .area _HOME
    .area _GSINIT
    .area _GSFINAL
    .area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
    .area _HOME
    .area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
    .area _CODE
;helloworld.c:10: void init_FOS()
;    ---------------------------------
; Function init_FOS
; ---------------------------------
_init_FOS::
;helloworld.c:19: __endasm;
    ld    bc,(#0xFF01)
    out    (c),c
    ld    bc,#0x7F82
    out    (c),c
    ld    (#0xB847),bc
;helloworld.c:20: }
    ret
;helloworld.c:22: void exit()
;    ---------------------------------
; Function exit
; ---------------------------------
_exit::
;helloworld.c:27: __endasm;
    ld    hl,#0xFE9A
    call    #0xFF12
;helloworld.c:28: }
    ret
;helloworld.c:31: void prints(char *text) __z88dk_fastcall
;    ---------------------------------
; Function prints
; ---------------------------------
_prints::
;helloworld.c:35: __endasm;
    call    #0xD48C
;helloworld.c:36: }
    ret
;helloworld.c:39: void main()
;    ---------------------------------
; Function main
; ---------------------------------
_main::
;helloworld.c:41: char* test = "\x1E\x15\x1aHallo FOS-WELT vom SDCC!";
;helloworld.c:43: init_FOS();
    call    _init_FOS
;helloworld.c:44: prints(test);
    ld    hl, #___str_0
    call    _prints
;helloworld.c:45: exit();
;helloworld.c:46: }
    jp    _exit
___str_0:
    .db 0x1e
    .db 0x15
    .db 0x1a
    .ascii "Hallo FOS-WELT vom SDCC!"
    .db 0x00
    .area _CODE
    .area _INITIALIZER
    .area _CABS (ABS)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 00:25, 16 March 21
You bank in the lower ROM ( LD BC,&7F82:OUT (C),C ). therefore the start of the program must be at &4000 or higher (ORG &4000).

Or you can use an OS function to copy the ROM character set to RAM (from &3800 to &3FFF) using OS function INRZ from ROM C.

However FIOLIB does provide a PRINT function for C (made for Small C - I got no idea if it works with SDCC).
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 18:16, 17 March 21
Also this is wrong:

Code: [Select]
    ld    bc,#0x7F82
    out    (c),c
    ld    (#0xB847),bc

Because RAM variable 'RAMCHAR EQU &B847' is a byte in size, not 16 Bit.
To load BC there will corrupt the Cursor position:

;FDC_RES EQU &B840
;RAMCHAR EQU &B847
;C_POS   EQU &B848
;AKT_ROM EQU &B84A
;AKT_RAM EQU &B84C

Somehow I'm afraid SDCC can't do it.


A simple 'Hello World' program for FutureOS look like this...
Code: [Select]
ORG &8000 ;Hello World - File HELLO.MAX

WRITE"HW.64K" ;SAVE assembled file to disc, Autostart at &8000
              ;The extension 64K tells, that the program runs in first 64K RAM

;Prints "Hello World" in the files section of the screen
;Doesn't disrupt the icon section

HELLO LD BC,(&FF01) ;BC contains &DF00 + ROM_select of FutureOS ROM A

 OUT (C),C ;Switch FutureOS ROM A on between &C000 and &FFFF

 LD  BC,&7F82     ;Selects MODE 2 and Lower ROM = ROM character set
 OUT (C),C        ;Switch it on!
 LD  (RAMCHAR),BC ;SAVE MODE and ROM configuration to OS system variable

 LD   HL,TXT ;Pointer to text, that shall be shown on screen
 CALL TERM_2 ;PRINT text on screen

 LD   HL,KLICK ;OS call KLICK is used to return to FutureOS with intact icons
 JP   ROM_D    ;Switches ON the ROM D and then jumps to HL (here to KLICK)

;Text

TXT DB &1E,21,26 ;Control Code &1E works as LOCATE, using 64 x 32 screen mode
                 ;The Y position is line 21, and the X pos. is column 26

 DB "Hello World!",0 ;The string is terminated by a 0 byte (or by &1A)



;EQUates of OS variables

RAMCHAR EQU &B847 ;located in first 64 KB RAM


;EQUates of System Calls

TERM_2 EQU &D48C ;located in ROM A
KLICK  EQU &FE9A ;located in ROM D
ROM_D  EQU &FF12 ;located in all ROMs

Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 01:16, 19 April 21
Anybody else participating? Let us know.  :)
Title: Re: Official Announcement: FutureOS Programming Contest open - End: 2021.12.01
Post by: GUNHED on 19:02, 20 May 21
Just a reminder... Please finish your project until 1st of Dezember this year.  :) :) :)


In case you need couple days more, let us know, and the deadline can be extended for some days.  :)