Compiling blitz3d on an amiga emulator

Miscellaneous Forums/General Discussion/Compiling blitz3d on an amiga emulator

Hi, im compiling a new blitz3d project using ADFopus to put my new file onto an amiga floppy disk image and load it into the 1997 version of blitz basic.

the problem is I dont have the manual, how do I setup the graphics mode/window on the amiga version?

how do I set the window size and how do I plot a pixel?

remember im talking about on an amiga using amiga blitz basic v1.8 though WINuae (amiga emulator)

It isn't April 1st you know.

And you wont believe it but it compiles without errors!
Well you where right about one thing.

the problem is I dont have the manual, how do I setup the graphics mode/window on the amiga version?
If memory serves, it was Graphics or Screen - depending on which type of display you want.

Its no b-@#!* ,it is really possible, here is me on my amiga emulator running blitz2 1990's by mark s.



I dont have the manual, so I dont no the commands to setup graphics modes etc.

my program only uses 2d-blit of course!!

HOW DO I PLOT PIXELS AND SET COLORS?

Amiga Blitz2 has 2 methods for graphics displays - One is AMIGA mode (default) and the other BLITZ mode.

In AMIGA mode you set up a display via system-friendly screen and window commands.

Example 1 - plotting to a window
; Window Plot

WBStartup :NoCli :DEFTYPE .w
FindScreen 0
Window 0,356,50,200,100,$1008|$2|$4|$1,"Plot Demo",1,2

Repeat
  WPlot Rnd(WindowWidth-40)+10,Rnd(WindowHeight-24)+16,Rnd(4)
  ev.l=Event
  If ev.l=$2 Then InnerCls
Until ev=$200

End



BLITZ mode kicks out the intution (and Workbench) and takes you into the Amigas hardware territory.

Example2 - Starfield 3D
DEFTYPE .w

#w=320 :#h=256

NPrint "Blitz Starfield 3D.." :VWait 50
BLITZ
BitMap 0,#w,#h,2
BitMap 1,#w,#h,2
Slice 0,44,2 :Use Palette 0
RGB 0,0,0,0 :RGB 1,$4,$4,$5 :RGB 2,$7,$8,$7 :RGB 3,$f,$f,$f
Use BitMap 0 :db=0
Show 0

cx=#w/2 :cy=#h/2 :stars=114
Dim x3d(stars), y3d(stars)
Dim z3d(stars), xs3d(stars), ys3d(stars)

Repeat
  Use BitMap db :Cls 0
  For d = 1 To stars
    z3d(d) = z3d(d) - 2: If z3d(d) < 1 Then Gosub newstar
    t = x3d(d) * 32: xs3d(d) = t / (z3d(d)) + cx
    t = y3d(d) * 32: ys3d(d) = t / (12 + z3d(d)) + cy
    If xs3d(d) < 0 OR xs3d(d) > #w Then Gosub newstar
    If ys3d(d) < 0 OR ys3d(d) > #h Then Gosub newstar
    If z3d(d) < 255 Then sc = 1
    If z3d(d) < 140 Then sc = 2
    If z3d(d) < 60 Then sc = 3
    Plot xs3d(d), ys3d(d), sc
  Next d
  ;MOVE# 2,$dff180
  VWait :Show db :db=1-db
Until Joyb(0)=1
VWait :End

newstar:
z3d(d) = 150 + (Rnd(100))
x3d(d) = Int(Rnd(2000)) - 1000
y3d(d) = Int(Rnd(2000)) - 1000
Return

I can pass you more info on the Slice/Bitmap/Screen/Window commands if thats ok with BRL.


if thats ok with BRL



[a http://www.back2roots.org/Tools/Files/?find=blitz+basic]I think it's safe to assume that Amiga Blitz is there to be enjoyed.[/a]

your emulating an arcade machine on a PC using an Amiga compiler and PC source code? I'm confused.

In any case BB isn't for sale anymore, and neither is the manual and the product was given away on magazine coverdisk. In the absense of official support i'd think your ok to help Jim. :)

i would need to plot around 2000 pixels a frame ,surely that isnt possible on an amiga.

2000 pixels is easy on Amiga, just use inline asm... ofcourse depends on how many bitplanes you need...


In any case BB isn't for sale anymore, and neither is the manual and the product was given away on magazine coverdisk. In the absense of official support i'd think your ok to help Jim. :)


Amiga Blitz was officially released under the GPL several years ago, as AmiBlitz (you can download the 68K Blitz compiler source, as well as the full distribution, on the Archives page):

http://www.blitz-2000.co.uk/

There's also a more recent distribution here on Aminet.

Bouncer: Sorry, but no way can you directly plot 2000 pixels per frame on an Amiga.

The only way you are going to do it is to write your own routine in asm that 'plots' to a buffer in fastram and then copy the buffer to chipram using the (030 or better) CPU.

Will work fine on WinUAE (Alien Breed 3D 2 is actually smooth with WinUAE) but on a real Amiga, forget it.

You could blit that many but individually no, not in BBasic with the Plot command! Maybe with assembly, it's only an area 40*50 pixels (oh yeah on several bitplaces oops (as Bouncer says) could be up to 5) ... depends what you have to do to work out the plot colour I guess too.

You could instance a copper/blitter assisted chunky-to-planar screenmode to let you render quite a lot of pixels, but the individual pixels would be 2x2 pixels in size, and you'd have to render everything else on the screen in a non-Amiga way as well.

All in all, a bit of a useless exercise.

point taken