Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BiFrost Multicolour engine.
#31
slenkar Wrote:thanks
You are welcome!
Reply
#32
ok I tried this code:
Code:
#include "bifrost.bas"

INK 5: PAPER 0: BORDER 0: CLS
PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"ENGINE";AT 6,24;"DEMO"; INK 4; AT 10,24;"WITH";AT 11,23;"BORIEL";AT 12,22;"ZX-BASIC"
   BIFROSTstart()
   BIFROSTresetTileImages(@MyUdgBlock)


While 1
LET a$=INKEY$
IF a<>"" THEN
BIFROSTsetTile(0, 0, 0)
BIFROSTsetTile(0, 1, 0)
BIFROSTsetTile(0, 2, 2)
BIFROSTsetTile(0, 3, 3)
BIFROSTsetTile(1, 0, 4)
BIFROSTsetTile(1, 1, 5)
BIFROSTsetTile(1, 2, 6)
BIFROSTsetTile(1, 3, 7)

PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"you";AT 6,24;"pressed"; INK 4; AT 10,24;"a";AT 11,23;"Button";
END IF
Wend

MyUdgBlock:
ASM
defb 255,129,129,129,129,129,129,255
defb 231,231,165,231,189,231,165,255
defb 0,248,190,255,127,255,213,255
END ASM

but the jester sprite doesnt look any different
Reply
#33
slenkar Wrote:but the jester sprite doesnt look any different
Please download all BIFROST* files (and library) again. There was an error in BIFROSTresetTileImages that I fixed last night, this should solve your problem.
Reply
#34
is it still randomize usr 32768?

the game doesnt start when I load the tape anymore
Reply
#35
slenkar Wrote:is it still randomize usr 32768?
Yes.

slenkar Wrote:the game doesnt start when I load the tape anymore
I just compiled and executed your latest program above using all files from "BIFROSTENGINEV1.2L_BorielZXBasicInterface.zip" and it worked as expected. It shows weird images in the multicolor area, but it's just because the tile images data you declared are not a real image.

Then I repeated all this process using "BIFROSTENGINEV1.2H_BorielZXBasicInterface.zip" and the result was exactly the same.

Perhaps you are compiling your program with one version but trying to run it using another?
Reply
#36
I still cant get it to work, did you upload the right files?

I attached the snapshot I made after I entered the code for the loader


Attached Files
.sna   codesnap.sna (Size: 48.03 KB / Downloads: 381)
Reply
#37
slenkar Wrote:I attached the snapshot I made after I entered the code for the loader
This snapshot doesn't have anything loaded on memory. Neither BIFROST*, tiles, or any ZX BASIC program. There's just the loader program, nothing else.

Try this: delete line 50 from the loader, then run it. It will load everything in memory without executing. Afterwards, take another snapshot and put it here, so I can analyze it and find out what's wrong.

Or perhaps you better describe exactly what you are doing, step by step, so I can identify what you are doing wrong.
Reply
#38
ok I load the snapshot, then I press RUN
Then I insert the tape bifrost_l.tzx or bifrostdem.tzx (both have the same result)
then it loads tiles, bifrost engine and bifrostdem
then..nothing else happens
Reply
#39
slenkar Wrote:ok I load the snapshot, then I press RUN
Then I insert the tape bifrost_l.tzx or bifrostdem.tzx (both have the same result)
then it loads tiles, bifrost engine and bifrostdem
then..nothing else happens

Ah! Once I knew the exact problem you had, it was easy to solve it!

The problem is that you typed invalid (hidden) characters between T and * in the word "BIFROST*". Fix it and it will work.

BTW you are not supposed to have a file called "bifrostdem.tzx". The file inside package "BIFROSTENGINEV1.2L_BorielZXBasicInterface.zip" is called "bifrostdem_L.tzx". Are you sure you downloaded the latest version?
Reply
#40
Argh!
Quote:The problem is that you typed invalid (hidden) characters between T and * in the word "BIFROST*". Fix it and it will work.

thanks
Reply
#41
small problem:
When I change the position of the tiles to my UDG block the program says OK at the bottom like its finished and then when I press a button I am typing in basic commands,

Code:
#include "bifrost.bas"

INK 5: PAPER 0: BORDER 0: CLS
PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"ENGINE";AT 6,24;"DEMO"; INK 4; AT 10,24;"WITH";AT 11,23;"BORIEL";AT 12,22;"ZX-BASIC"
   BIFROSTstart()
   BIFROSTresetTileImages(@MyUdgBlock)


While 1
LET a$=INKEY$
IF a<>"" THEN
Dim iter as UInteger
for x=0 to 8
for y=0 to 8
BIFROSTsetTile(x, y, iter)
iter=iter+1
next
next

PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"you";AT 6,24;"pressed"; INK 4; AT 10,24;"a";AT 11,23;"Button";
END IF
Wend

MyUdgBlock: REM a simple Label; @Label returns it's memory address
ASM
defb 255,129,129,129,129,129,129,255
defb 231,231,165,231,189,231,165,255
defb 0,248,190,255,127,255,213,255
END ASM

this doesnt happen when I do the POKE commands to make sprites




Trying to poke some values for a static sprite:
Code:
#include "bifrost.bas"

INK 5: PAPER 0: BORDER 0: CLS
PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"ENGINE";AT 6,24;"DEMO"; INK 4; AT 10,24;"WITH";AT 11,23;"BORIEL";AT 12,22;"ZX-BASIC"
   BIFROSTstart()
Dim pokepos as Uinteger
pokepos=48500+(BIFROSTSTATIC*64)
POKE pokepos,0
POKE pokepos+1,16
POKE pokepos+2,0
POKE pokepos+3,56
POKE pokepos+4,0
POKE pokepos+5,124
POKE pokepos+6,0
POKE pokepos+7,124
POKE pokepos+8,0
POKE pokepos+9,124
POKE pokepos+10,0
POKE pokepos+11,56
POKE pokepos+12,0
POKE pokepos+13,16
POKE pokepos+14,0
POKE pokepos+15,0
POKE pokepos+16,0
POKE pokepos+17,0
POKE pokepos+18,0
POKE pokepos+19,0
POKE pokepos+20,0
POKE pokepos+21,0
POKE pokepos+22,0
POKE pokepos+23,0
POKE pokepos+24,0
POKE pokepos+25,0
POKE pokepos+26,0
POKE pokepos+27,0
POKE pokepos+28,0
POKE pokepos+29,0
POKE pokepos+30,0
POKE pokepos+31,0

While 1
LET a$=INKEY$
IF a<>"" THEN
Dim iter as UInteger
iter=0
for x=0 to 8
for y=0 to 8
BIFROSTsetTile(x, y,BIFROSTSTATIC+ iter)
iter=iter+1
next
next

PRINT INK 6;AT 4,22;"slenkars";AT 5,23;"you";AT 6,24;STR(pokepos); INK 4; AT 10,24;"a";AT 11,23;"Button";
END IF
Wend

but none of the sprites look different

also how do you convert ink,paper,bright,flash into a byte?

so far im doing this...
ink value e.g. 011
plus paper value e.g.111
plus bright 1 or 0
plus flash 1 or 0

it doesnt seem to work

by binary to int function must be right because it works for the bitmaps
Reply
#42
I have no idea what you are trying to do in the first program. In particular, notice each tile image takes 64 bytes, but you only defined 24 bytes, thus everything else is filled with garbage.

In your second program, replace this line:
Code:
pokepos=48500+(BIFROSTSTATIC*64)
with this:
Code:
pokepos=48500
Reply
#43
slenkar Wrote:also how do you convert ink,paper,bright,flash into a byte?
This line below is a copy/paste from "bifrost.bas":
Code:
'     attr: attribute value (0-255), INK+8*PAPER+64*BRIGHT+128*FLASH
Reply
#44
Quote:I have no idea what you are trying to do in the first program. In particular, notice each tile image takes 64 bytes, but you only defined 24 bytes, thus everything else is filled with garbage.


the program shouldnt end though should it?
No matter what bytes are beyond those first 24



einar Wrote:In your second program, replace this line:
Code:
pokepos=48500+(BIFROSTSTATIC*64)
with this:
Code:
pokepos=48500


Im trying to poke some values into a static sprite,

pokepos=48500+(BIFROSTSTATIC*64)

was my attempt to work out what address to poke to for the first static sprite


64 (bytes per sprite) multiplied by where the static sprites start (128)
Reply
#45
thanks to you giving me the color algorithm I finished the editor
SPACE to save

<!-- m --><a class="postlink" href="http://slenkar.herobo.com/brofist/brofist.html">http://slenkar.herobo.com/brofist/brofist.html</a><!-- m -->

[Image: oeDmz.png]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)