Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BiFrost Multicolour engine.
#46
slenkar Wrote:the program shouldnt end though should it?
No matter what bytes are beyond those first 24
I tested it and it doesn't end for me! It only changes the (random) tiles whenever I press any key.

slenkar Wrote: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
This is incorrect.

In BIFROST*, the same tiles can be rendered either as static or animated.

If you want to show tile 0 as animated, use this:
Code:
BIFROSTsetTile(x, y, 0)
and if you want to show the same tile 0 as static, use this:
Code:
BIFROSTsetTile(x, y, BIFROSTSTATIC + 0)
In both cases, the address for tile 0 will be the same:
Code:
pokepos=48500+(0*64)
Reply
#47
slenkar Wrote: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 -->
This is a great tool, good work!!!

Just a small correction: you should remove "Uinteger" from the POKEs. Thus instead of this:
Code:
POKE Uinteger 48500,0
POKE Uinteger 48501,0
...
It should be:
Code:
POKE 48500,0
POKE 48501,0
...
Using "Uinteger" is not necessary. In practice it should also work, but the compiled program will be bigger and slower for no reason.

Except for this, I loved it and I would like to post the link to your tool at WoS forum also, if you agree! Smile
Reply
#48
BTW may I suggest an improvement for your tool?

Here's your original program, but with the tile image defined using defb:
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
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

MyUdgBlock: REM a simple Label; @Label returns it's memory address
ASM
  defb 0,0,31,128,11,128,14,128
  defb 15,128,103,128,255,192,15,128
  defb 31,128,25,128,49,192,48,192
  defb 48,96,96,96,64,96,0,240
  defb 0,0,7,7,2,7,2,7
  defb 1,1,2,1,7,1,1,1
  defb 5,5,5,5,5,5,5,5
  defb 6,5,6,5,6,6,0,6
END ASM
My suggestion for your tool is that SPACE could "save" the result using POKEs (as the current version) and ENTER could "save" the result using defb as above!
Reply
#49
ok I will add the suggestions . you can post it on any forums
Reply
#50
slenkar Wrote:ok I will add the suggestions . you can post it on any forums
Thank you!
Reply
#51
ok the new version is done. (same address)

I tried doing the UDGblock method with bifrost engine but it still made the program stop

(the animations continue)
but it says OK at the bottom and all keyboard input produces BASIC code at the bottom of the spectrum screen
Reply
#52
slenkar Wrote:ok the new version is done. (same address)

I tried doing the UDGblock method with bifrost engine but it still made the program stop

(the animations continue)
but it says OK at the bottom and all keyboard input produces BASIC code at the bottom of the spectrum screen
Can you send me both the source code listing and the compiled TAP file? I will test exactly the same file myself to see if I can find out the problem.

What are the Spectrum model you are using to test it? Are you testing it in 48 BASIC or 128 BASIC mode?
Reply
#53
turns out the reason was because I used REM on the pokes which didnt really get rid of them,
so moving the tile image location AND doing the pokes caused the program to end, dont know why

heres the 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)
REM
POKE 48628,0
POKE 48629,0
POKE 48630,5
POKE 48631,128
POKE 48632,7
POKE 48633,192
POKE 48634,7
POKE 48635,192
POKE 48636,15
POKE 48637,240
POKE 48638,31
POKE 48639,252
POKE 48640,31
POKE 48641,84
POKE 48642,127
POKE 48643,231
POKE 48644,228
POKE 48645,124
POKE 48646,117
POKE 48647,224
POKE 48648,245
POKE 48649,224
POKE 48650,117
POKE 48651,224
POKE 48652,228
POKE 48653,224
POKE 48654,31
POKE 48655,224
POKE 48656,15
POKE 48657,224
POKE 48658,15
POKE 48659,224
POKE 48660,0
POKE 48661,0
POKE 48662,34
POKE 48663,34
POKE 48664,34
POKE 48665,34
POKE 48666,34
POKE 48667,32
POKE 48668,34
POKE 48669,34
POKE 48670,34
POKE 48671,34
POKE 48672,34
POKE 48673,56
POKE 48674,57
POKE 48675,56
POKE 48676,57
POKE 48677,56
POKE 48678,57
POKE 48679,34
POKE 48680,57
POKE 48681,34
POKE 48682,57
POKE 48683,34
POKE 48684,57
POKE 48685,34
POKE 48686,32
POKE 48687,32
POKE 48688,34
POKE 48689,34
POKE 48690,32
POKE 48691,32
END REM
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,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

MyUdgBlock:
ASM
defb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,56,0,56,0,56,0,0,0,0,0,0,0,0,0,0,0
defb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,105,0,81,0,17,0,0,0,0,0,0,0,0,0,0,0
END ASM

loadersnap.sna is the loader i use
please see attached bifrostgame.tzx


Attached Files
.sna   loadersnap.sna (Size: 48.03 KB / Downloads: 412)
.tzx   bifrostgame.tzx (Size: 2.63 KB / Downloads: 471)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)