clth Posted July 9, 2020 Share Posted July 9, 2020 Hello, i would like to move xbios to start on page 4 instead of default 7. My guess is that it can be done according memory layout but i just cant figure out any xbios.cfg settings which do work same as default one plus shift. Thanks. Quote Link to comment Share on other sites More sharing options...
rensoup Posted July 9, 2020 Share Posted July 9, 2020 I have it at $600 but I guess it should be ok at $400 ? I just build this file with MADS which becomes xbios.cfg (25 bytes) to be placed inside your ATR xbios43cfg.asm: opt h- icl "xbios43.inc" .byte $43 ; config for v4.3 version .byte c'LAUNCHEROBX' ; autorun file fname .byte >xBIOS_BASE ; xB adress for relocator .byte >(xBIOS_BASE-$100) ; xB buffer adress for relocator .word $02e2 ; INITAD .word $02e0 ; RUNAD .word $0000 ; custom I/O module - $0000 means use internal xB SIO .word $0000 ; relocator for custom I/O module .byte $ff ; PORTB - you can't swith off BASIC this way .byte $40 ; NMIEN - config at start .byte $80 ; IRQEN - config at start xbios43.inc is where you set the address (xBIOS_BASE) to be included in the file above and in your project (to call xBIOS_OPEN_FILE,...) xBIOS_BASE =$600 ; // must update LORAM_TOP ( can't just equal it to LORAM_TOP because this file is also included in xbioscfg.asm which gets rebuilt into xbios.cfg) xBIOS_SIZE =$400 xBIOS_VERSION =xBIOS_BASE+$02 xBIOS_RENAME_ENTRY = xBIOS_BASE+$03 xBIOS_LOAD_FILE = xBIOS_BASE+$06 xBIOS_OPEN_FILE = xBIOS_BASE+$09 xBIOS_LOAD_DATA = xBIOS_BASE+$0c xBIOS_WRITE_DATA = xBIOS_BASE+$0f xBIOS_OPEN_CURRENT_DIR = xBIOS_BASE+$12 xBIOS_GET_BYTE =xBIOS_BASE+$15 xBIOS_PUT_BYTE =xBIOS_BASE+$18 xBIOS_FLUSH_BUFFER = xBIOS_BASE+$1b xBIOS_SET_LENGTH = xBIOS_BASE+$1e xBIOS_SET_INIAD = xBIOS_BASE+$21 xBIOS_SET_FILE_OFFSET = xBIOS_BASE+$24 xBIOS_SET_RUNAD = xBIOS_BASE+$27 xBIOS_SET_DEFAULT_DEVICE = xBIOS_BASE+$2a xBIOS_OPEN_DIR =xBIOS_BASE+$2d xBIOS_LOAD_BINARY_FILE = xBIOS_BASE+$30 xBIOS_OPEN_DEFAULT_DIR = xBIOS_BASE+$33 xBIOS_SET_DEVICE = xBIOS_BASE+$36 xBIOS_RELOCATE_BUFFER = xBIOS_BASE+$39 xBIOS_GET_ENTRY = xBIOS_BASE+$3c xBIOS_OPEN_DEFAULT_FILE = xBIOS_BASE+$3f xBIOS_READ_SECTOR = xBIOS_BASE+$42 xBIOS_FIND_ENTRY = xBIOS_BASE+$45 xBIOS_SET_BUFFER_SIZE = xBIOS_BASE+$48 xDIRSIZE = xBIOS_BASE+$3e5 ; current directory size in sectors (1 byte) xSPEED = xBIOS_BASE+$3e6 ; STANDARD SPEED (1 byte) xHSPEED = xBIOS_BASE+$3e7 ; ULTRA SPEED (1 byte) xIRQEN = xBIOS_BASE+$3e8 ; User IRQ (1 byte) xAUDCTL = xBIOS_BASE+$3e9 ; AUDCTL xFILE = xBIOS_BASE+$3ea ; File handle (2 bytes) xDIR = xBIOS_BASE+$3ec ; Root directory handle (2 bytes) xIOV = xBIOS_BASE+$3ee ; I/O module entry (2 bytes) xBUFFERH = xBIOS_BASE+$3f0 ; Buffer adr hi byte (1 byte) xBUFSIZE = xBIOS_BASE+$3f1 ; Buffer size lo byte $100-SIZE (1 byte) xDAUX3 = xBIOS_BASE+$3f2 ; Buffer offset (1 byte) xSEGMENT = xBIOS_BASE+$3f3 ; Bytes to go in binary file segment (2 bytes) xNOTE = xBIOS_BASE+$3f5 ; File pointer (3 bytes) xDEVICE = xBIOS_BASE+$3fc ; Device ID xDCMD = xBIOS_BASE+$3fd ; CMD (1 byte) xDAUX1 = xBIOS_BASE+$3fe ; Sector lo byte (1 byte) xDAUX2 = xBIOS_BASE+$3ff ; Sector hi byte (1 byte) and that should do it... xbios.cfg xbios43cfg.asm xbios43.inc 1 1 Quote Link to comment Share on other sites More sharing options...
clth Posted July 10, 2020 Author Share Posted July 10, 2020 (edited) Thanks alot for detailed answer, i forgot to adjust my base offset for xbios area. It seems that it has something to do with I/O location which by value reported by xbios menu - gets configured to pretty random address which is often occupied my program after load. This address can be overridden in config, default one seem to be 0x03C0 which possibly can cause overlap but there is no documentation and bit too low level stuff for me unfortunately. With this xbios.cfg which should equal xbios defaults you wrote I can get program loaded but keyboard is not working at all. Without xbios.cfg, just with xbios builtin defaults is everything ok. 00000000 43 58 41 55 54 4f 52 55 4e 20 20 20 08 07 e2 02 |CXAUTORUN ....| 00000010 e0 02 00 00 00 00 ff 40 80 |.......@.| Edited July 10, 2020 by clth Quote Link to comment Share on other sites More sharing options...
rensoup Posted July 11, 2020 Share Posted July 11, 2020 On 7/11/2020 at 1:13 AM, clth said: With this xbios.cfg which should equal xbios defaults you wrote I can get program loaded but keyboard is not working at all. Without xbios.cfg, just with xbios builtin defaults is everything ok. Oh yeah I probably disabled the IRQ... specifically to kill the keyboard handler! On 7/10/2020 at 1:14 AM, rensoup said: .byte $80 ; IRQEN - config at start You should probably set this back to whatever value was in your config Quote Link to comment Share on other sites More sharing options...
clth Posted July 13, 2020 Author Share Posted July 13, 2020 Kind of figured out right xbios settings after all, thanks. Quote Link to comment Share on other sites More sharing options...
xxl Posted July 15, 2020 Share Posted July 15, 2020 The xbios file starts with a configuration, so if you don't want to use an external file, you can edit the beginning of the xBIOS file (just after the header there is a configuration in the same format). If you are bothered by the menu, you can delete it - just cut off the 5th and 6th block of the xBIOS file (it is not needed if you are not using the MENU and operating system for I / O) 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.