Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native ARM Co Pro: Implement additional APIs #33

Open
hoglet67 opened this issue Feb 18, 2017 · 1 comment
Open

Native ARM Co Pro: Implement additional APIs #33

hoglet67 opened this issue Feb 18, 2017 · 1 comment

Comments

@hoglet67
Copy link
Owner

hoglet67 commented Feb 18, 2017

Not all the APIs that BBC Basic uses are currently implemented.

(Updated 7/9/2021)

There are implemented:

(Operating System)
00      WRITEC
01      WRITES
02      WRITE0
03      NEWLINE
04      READC
05      CLI
06      BYTE
07      WORD
08      FILE
09      ARGS
0A      BGET
0B      BPUT
0C      MULTIPLE (aka GBPB)
0D      OPEN (aka FIND)
0E      READLINE
10      GETENV
11      EXIT
16      ENTERSWI (aka EnterOS but check usage)
1C      MOUSE
2B      GENERATEERROR
31      READVDUVARIABLES                                used in A=VDU(x)
32      READPOINT                                       used in A=POINT(x,y)
39      SWINUMBERFROMSTRING                             used in SYS and assembler
20040   XOSCHANGEENV
20045   XOSPLOT
46      WRITEN
65      SCREENMODE
2006E   XOSSYNCHRONISECODEAREAS
100     WRITEI

(Operating System Modules)
40743   COLOURTRANSSETGCOL
40761   COLOURTRANSSETTEXTCOLOUR
62C81   BASICTrans_Error
62C80   BASICTrans_HELP
62C82   BASICTrans_Message

These are not implemented:

(Operating System)
2001E   XOS_Module                                      used in modHead.s
23      READVARVAL                                      used to read BASIC$crunch)
61      SETCOLOUR                                       used in COLOUR OF <colour num> ON <colour num>
DC      OS_ConvertInteger4                              used in module MOVEMEMORY

(Operating System Modules)
40140   SOUNDCONFIGURE
40141   SOUNDENABLE
401C6   SOUNDEVENTQBEAT
401C1   SOUNDEVENTQSCHEDULE
401C5   SOUNDEVENTTEMPO
40142   SOUNDSTEREO
4018A   SOUNDVOICE
4305F   Territory_ReadCalendarInformation
400EC   WIMPSLOT

A stretch goal might be to reach parity with Sprow's ARM7TDMI Co Pro:
http://www.sprow.co.uk/bbc/hardware/armcopro/armtubeoscalls.pdf

For GCOL syntax, see here

@hoglet67 hoglet67 changed the title Native ARM Co Pro: Implement additional API Native ARM Co Pro: Implement additional APIs Feb 18, 2017
@jgharston
Copy link
Contributor

2001E XOS_Module
Used by the *BASIC command to RMRun itself, the ARM equivalent of *FX142,n

31 READVDUVARIABLES used in A=VDU(x)
61 SETCOLOUR
65 SCREENMODE
Simple enough to implement.
READVDUVARIABLES(n)=OSBYTE(160,n)
SETCOLOUR(n):VDU 17,n or VDU 18,k,n as appropriate. The read functions can be implemented with the algorithm worked out at http://beebwiki.mdfs.net/Reading_current_colours

SCREENMODE: I think this is only used with MODE "string". MODE number does VDU 22,number, so returning a SWI not known error would probably be most appropriate.

40140+x SOUND_*
Not really sure how we could implement these, as the BBC doesn't have the hardware required. These are only called with SOUND with five parameters, SOUND with four parameters calls the standard OSWORD 7 SOUND call.

DC OS_ConvertInteger4 used in module MOVEMEMORY
Called if BASIC's memory is moved. Not needed until we implement a multi-tasking task manager :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants