![]() |
BiFrost Multicolour engine. - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +--- Thread: BiFrost Multicolour engine. (/showthread.php?tid=441) |
Re: BiFrost Multicolour engine. - slenkar - 07-18-2012 it still has the same error what language do you use to create BorIDE, does it allow you to ask for full admin rights on startup? Re: BiFrost Multicolour engine. - LCD - 07-18-2012 slenkar Wrote:it still has the same error Strange, I will check it further. Want anyway to add BiFrost Engine to binary library too. I use PureBasic 4.61 with GoScintilla to create BorIDE. No, it does not have the abiliity to ask for full admin rights. Click with right mouse button on BorIDE icon, select "Compatibility" and check "Execute as administrator". I see a problem with the Include: it looks like some adresses can collide with heap (64995, 65012). Crash can occur if strings are used. Not very good style of coding in the demo: No labels but line numbers... GO SUB instead of GOSUB (This is not compatible with folding as SUB is a folding keyword. Must fix this Re: BiFrost Multicolour engine. - einar - 07-19-2012 Hi, I only noticed this thread now! I don't have much experience with BorIDE but let me see if I can help on everything else... slenkar Wrote:Also when I compile this with the command lineI could not reproduce this problem. Can you provide the complete error message? Did you modify the demo code anyhow? What version of ZX BASIC you are using? Notice you must download file BIFROSTENGINEV1.2_BorielZXBasicInterface.zip from http://www.worldofspectrum.org/infoseekid.cgi?id=0027405, extract both BAS files to ZX BASIC "dist" folder, then compile it using the command line specified at the beginning of the BAS file: zxb.exe bifrostdem.bas -T -B slenkar Wrote:it says I have to use this loaderI suggest creating a snapshot with most code blocks already loaded in memory, except for your own code. I previously wrote about it here: http://www.worldofspectrum.org/forums/showthread.php?p=640647#post640647 Re: BiFrost Multicolour engine. - einar - 07-19-2012 LCD Wrote:I see a problem with the Include: it looks like some adresses can collide with heap (64995, 65012). Crash can occur if strings are used.No, this is not a problem at all. This was previously discussed at http://www.worldofspectrum.org/forums/showpost.php?p=608597&postcount=59 . Also notice that if a program crashes because it doesn't have enough free memory (heap space) to process strings, then simply changing the order of routines (such as if BIFROST* was placed at the beginning instead of end of memory) won't magically increase the amount of free memory left ![]() LCD Wrote:Not very good style of coding in the demo: No labels but line numbers... GO SUB instead of GOSUBThis is intentional. The demo is supposed to be easy to understand for ZX-Spectrum programmers that are familiar with Sinclair BASIC but not with ZX BASIC. So I wrote it as close to Sinclair BASIC as possible. This is also the reason the demo doesn't use sub-routines and such. The interface library itself is a different matter obviously. LCD Wrote:(This is not compatible with folding as SUB is a folding keyword. Must fix thisPlease do so. This syntax is perfectly valid in ZX BASIC, thus BorIDE is supposed to recognize it accordingly. And I will resist making any jokes about problems with BorIDE not being a very good style of coding either ![]() ![]() ![]() Re: BiFrost Multicolour engine. - slenkar - 07-19-2012 I got the error on the speccy because I didnt use the loader, I will try the snapshot idea next time im doing speccy coding, thanks for the help Re: BiFrost Multicolour engine. - einar - 07-19-2012 slenkar Wrote:I got the error on the speccy because I didnt use the loader, I will try the snapshot idea next time im doing speccy coding, thanks for the helpYou are welcome! Re: BiFrost Multicolour engine. - LCD - 07-19-2012 einar Wrote:Even a better reason to introduce them to proper useLCD Wrote:Not very good style of coding in the demo: No labels but line numbers... GO SUB instead of GOSUBThis is intentional. The demo is supposed to be easy to understand for ZX-Spectrum programmers that are familiar with Sinclair BASIC but not with ZX BASIC. So I wrote it as close to Sinclair BASIC as possible. This is also the reason the demo doesn't use sub-routines and such. ![]() einar Wrote:The interface library itself is a different matter obviously.Already found it out. Excellent work! einar Wrote:Okay, in the next version any SUB and FUNCTION that are folded must start from beginn of the line. No spaces or tabs in front of them are allowed, or it will be not recognised as foldable part. ASM will work as expected on the other side.LCD Wrote:(This is not compatible with folding as SUB is a folding keyword. Must fix thisPlease do so. This syntax is perfectly valid in ZX BASIC, thus BorIDE is supposed to recognize it accordingly. Also tried to make 8x1 Attributes mode for Painter for designing the Tiles. I hope, you will allow to include the binaries of BiFrost in the Binary Library for easier usage of the engine, when I'm done. einar Wrote:And I will resist making any jokes about problems with BorIDE not being a very good style of coding eitherYou can make this kind of jokes. Re: BiFrost Multicolour engine. - einar - 07-20-2012 LCD Wrote:Even a better reason to introduce them to proper useAnother reason is that BIFROST* also provides exactly the same demo in Sinclair BASIC. I wanted to make it easier for people to compare both versions, to make it easier to recognize the (small) differences from Sinclair BASIC to ZX BASIC, somewhat as an incentive for programmers to try ZX BASIC. LCD Wrote:Already found it out. Excellent work!Thank you! LCD Wrote:Okay, in the next version any SUB and FUNCTION that are folded must start from beginn of the line. No spaces or tabs in front of them are allowed, or it will be not recognised as foldable part. ASM will work as expected on the other side.Seems like a good solution to this issue. LCD Wrote:Also tried to make 8x1 Attributes mode for Painter for designing the Tiles.This is great, thank you! LCD Wrote:I hope, you will allow to include the binaries of BiFrost in the Binary Library for easier usage of the engine, when I'm done.Sure, go ahead. LCD Wrote:You can make this kind of jokes.But I will make no more jokes, I was just getting my revenge against your original comment ![]() Re: BiFrost Multicolour engine. - slenkar - 07-20-2012 when i type in 20 LOAD "TILES"CODE into the speccy it shows a question mark, like I typed in the wrong thing When I type in 10 CLEAR 32767 it accepts the code and prints it to the top of the screen as normal Re: BiFrost Multicolour engine. - einar - 07-20-2012 slenkar Wrote:when i type in 20 LOAD "TILES"CODE It seems you are typing C-O-D-E as 4 different letters, instead of pressing Caps+Symbol then key "i" for the CODE keyword. Re: BiFrost Multicolour engine. - slenkar - 07-24-2012 thanks that worked, do you know of a good speccy emulator that lets you insert a tape without resetting the spectrum? Re: BiFrost Multicolour engine. - einar - 07-24-2012 slenkar Wrote:thanks that worked, do you know of a good speccy emulator that lets you insert a tape without resetting the spectrum? All emulators allow you to do it, you just need to select the proper settings. Re: BiFrost Multicolour engine. - slenkar - 07-24-2012 ok I used jSpeccy I loaded the basic code into the emulator and it appeared on the screen then I pressed 'run' inserted the bifrost DEMO tape from world of spectrum it loaded the tiles it also loaded bifrost* which is the engine correct? then inserted the bifrostdem tape that I compiled from boriels zxbasic press play on tape and it runs! I inserted my name to make sure I was doing it right ![]() I decided to make a simple program so I can experiment poking values, to change the tiles, here is my code: Code: #include "bifrost.bas" it looks like this: ![]() which weird because I didnt put any tiles on the screen in my code but anyway, when I press a key the tiles change correctly, but they dont look any different, it seems my POKE didnt make any difference doing this seems to work: Code: POKE Uinteger 48500,1 is there a better way of inputting the data? Re: BiFrost Multicolour engine. - einar - 07-25-2012 slenkar Wrote:it also loaded bifrost* which is the engine correct?Correct. slenkar Wrote:This line is wrong. If you want to set the address of your tile images, try this: Code: BIFROSTresetTileImages(@MyUdgBlock) slenkar Wrote:it looks like this:But you didn't clear the tile map either, thus the engine is rendering whatever garbage was left there when your program starts. slenkar Wrote:but anyway, when I press a key the tiles change correctly,It's due to your incorrect POKE I mentioned above. slenkar Wrote:doing this seems to work:You should not use Uinteger in this case, besides this is not a good way to do it anyway. slenkar Wrote:is there a better way of inputting the data?Either use BIFROSTresetTileImages(@MyUdgBlock) as I mentioned above, or save the tiles separately on tape replacing the original "TILES" block. Re: BiFrost Multicolour engine. - slenkar - 07-25-2012 thanks |