Jump to content
IGNORED

FastBasic - New Year Release


dmsc

Recommended Posts

thanks for the data-help.

 

I make an xex with start address $ 3000 with the cfg.

FEATURES {

STARTADDRESS: default = $3000;

the dli starts at $2000.
if I pull the xex into the altirra, the program works.
if I put the xex on an atr and start in the altirra from the disk, the altirra crashes.

 

greeting

dlist =560
savmsc=$58
 
colpf0=$d016
colpf1=$d017
colpf2=$d018
colpf3=$d019
 
ramadr=$2000
 
data dlidat() byte = $70, $70, $70, $44, $00, $20, $4, $4, $4, $4, 
data          byte = $4,$4,$41, $00, $00
 
dpoke adr(dlidat)+13,ramadr
 
dpoke dlist,adr(dlidat)
dpoke savmsc,ramadr 
 
poke colpf0,10
poke colpf1,10
poke colpf2,10
poke colpf3,10
 
for i=0 to 12
   print "printen..."
next i
 
repeat
until key()

post-31221-0-18986400-1536529364_thumb.jpg

post-31221-0-98357000-1536529373_thumb.jpg

Edited by funkheld
Link to comment
Share on other sites

pick a dos that doesn't use your memory area and format the atr with that dos and make it bootable with the write DOS or boot x32x.dos function then copy your exe to it...

if it is not basic then hold option key during boot (in an emu make sure basic is not attached)

if it is going to be a basic program attach cartridge on 800 or do not hold option (or make sure basic rom is not selected in emu)

 

then just load it like normal in whatever dos you chose or even make an autorun.sys etc..

Edited by _The Doctor__
Link to comment
Share on other sites

Hi Funkheld!

 

who can please give me a little displaylist (dli) that works too

make for the fastbasic from atr do altirra?

 

I can not get that as oldmen.

If your little program with the DL already works as XEX, the problem is how you are generating the ATR.

 

What tools are you using for creating the ATR?

 

I personally use my own "mkatr" tool, that is compatible with SpartaDOS and BW-DOS , but many people use other tools. A good one is "dir2atr" by @HiassofT, it allows selecting a DOS or a mini "pico-dos" to load your program.

 

Attached is an ATR with your compiled program.

funkheld.atr

Edited by dmsc
  • Like 1
Link to comment
Share on other sites

Hi Funkheld!

 

makeATR.exe , this is the programm.for the atr.

Ok, what I did was:

 

- Open makeATR.exe (I'm on Linux, so I used wine)

- Open an ATR with DOS-2.5.

- Remove all files except DOS.SYS and DUP.SYS.

- Insert the compiled program ( FUNKHELD.XEX )

- Rename the program to AUTORUN.SYS (this makes the program run at DOS start).

- Save as TEST.ATR

 

Now, the ATR correctly loads and run the program. Note that the output will have extraneous data after loading DOS, because you are not clearing the memory area from $2000 to the end of the display, so any data there will be keep between runs.

 

All in all, I think that is much easier to use a command line tool, like "dir2atr" (download from http://www.horus.com/~hias/atari/), so building the ATR can be automated, you can simply do:

 

  dir2atr -b MyPicoDos405 OUTPUT.ATR C:\PATH\TO\DIR\WITH\XEX\ 
  • Like 2
Link to comment
Share on other sites

thanks now it works.
The graphics 160x92 works wonderfully with the displaylist.

the second graphic (displaylist) 320x192 exceeds the 1kb limit.
where is the new address jump address now used?

Thank you.
greeting

 

fastbasic.cfg

--------------------------------------------------------

FEATURES {

STARTADDRESS: default = $4000;

--------------------------------------------------------

 

is ok !!!!! displaylist. 160x96

dlist =560
savmsc=$58
 
ramadr=$2000
 
data dlidat() byte = $70, $70, $4d, 
data          byte = $00,$20,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,
data          byte = $0D, $0D, $0D, $0D, $0D, $41, 
data          byte = $00, $00            
             
dpoke adr(dlidat)+102,adr(dlidat)
dpoke dlist,adr(dlidat)
dpoke savmsc,ramadr 
 
for i=0 to 3839
   poke $2000+i,129
next   
 
repeat
until Key()
Edited by funkheld
Link to comment
Share on other sites

here is the displaylist for 320x192 :

where is the new address jump address now used?

 

 

fastbasic.cfg

--------------------------------------------------------

FEATURES {

STARTADDRESS: default = $4000;

--------------------------------------------------------

savmsc=$58
 
ramadr=$2000
 
data dlidat() byte = $70, $70, $4F, 
data          byte = $00, $20,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,
data          byte = $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,$0F, $41, 
data          byte = $00, $00            
             
dpoke adr(dlidat)+197,adr(dlidat)
dpoke dlist,adr(dlidat)
dpoke savmsc,ramadr 
 
for i=0 to 7679
   poke $2000+i,129
next   
 
repeat
until Key()
Edited by funkheld
Link to comment
Share on other sites

Hi Funkheld!

 

Hi good afternoon.

 

i not found "CLS" for Text and "CLS for "GRAFIK" ?

 

Thank you.

Yes, there is no "CLS" statement currently, I can add it to the next FastBasic version, it's only 9 bytes more in the IDE.

 

In the mean time, I suggest using " PUT 125 " for the text screen and " PUT #6, 125 " for the graphics screen.

  • Like 1
Link to comment
Share on other sites

Hi Funkheld!

 

here is the displaylist for 320x192 :

where is the new address jump address now used?

 

Generating the display list for screens with more than 4096 bytes ($1000) is not trivial, as you need to ensure that the last byte of a line is just one before the address wrap.

 

I suggest using the OS functions, this will make the program simpler.

 

This is an example that creates two 160x192 screens and alternates between the two:

' OS equates
SDLSTL =$230
SAVMSC = $58
RAMTOP = $6A

' Stores original ramtop
rtop = peek(RAMTOP)

' Sets the top of memory to our reserved address
poke RAMTOP, $40
gr. 15+16

' Save the address of display-list and display data
dlist1 = dpeek(SDLSTL)
scrad1 = dpeek(SAVMSC)

' Draw some simple graphics
i0 = 0 : exec draw

' Now, generate "original" screen
poke RAMTOP, rtop
gr. 15+16

' Save the address of display-list and display data
dlist2 = dpeek(SDLSTL)
scrad2 = dpeek(SAVMSC)

' Draw some simple graphics
i0 = 3 : exec draw

' Alternate screens
repeat
  exec screen1
  pause 5
  exec screen2
  pause 5
until key()

end


proc draw
  color 1
  for i=i0 to 100 step 10
    plot i,0
    dr. 0,100-i
  next i
endproc

proc screen1
  pause 0
  dpoke SDLSTL, dlist1
  dpoke SAVMSC, scrad1
endproc

proc screen2
  pause 0
  dpoke SDLSTL, dlist2
  dpoke SAVMSC, scrad2
endproc
Compile with a start-address of at least $4000.

 

Warning: original OS versions had a bug with screen clearing, so you need to reserve 256 bytes more memory than actually needed.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello thanks for the information.

how does that work with the parser for fastbasic

how is please which file in what implemented?

 

can you please give a brief introduction for that?

 

What does the batch look like if I do it under d: \ atari \ mads?

 

Thank you.

greeting

Sorry, I am not able to answer to your questions.

I can only advise you to try Mad Studio.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...