|
Post by Tom Maneiro on May 27, 2006 23:45:52 GMT -5
Any progress on multidimensional arrays? I'm planning to port Sudoku to the Genesis (i already have a nice Java generator), but since BEX only support 1-dimension arrays (the old-fashioned vectors)...
|
|
|
Post by Tulio Adriano on Aug 28, 2006 13:10:27 GMT -5
Hi there! I found some bugs: 1) when you place more than 47 values in a line with the Data statement the line stops being recognized by the IDE. 2) when you pass more than 99 values and compile the program the compilation returns Runtime Error 9 (subscript out of range) and aborts the IDE without compiling the program. Hope that can be fixed for next version, and that the next versions is comming soon! Cya Tulio Adriano
|
|
|
Post by Tom Maneiro on Sept 3, 2006 17:54:26 GMT -5
Here is a beefy bug report, listing some nasty issues that were discovered when coding latest PLACAMASTER update on BEX 0.21: Key: RT: runtime errors CP: compiler errors IDE: IDE-related stuff 1) INPUT/RT: bounds check missing, can cause freezing and/or 68K exceptions if you try to input a long string into a shorter one: dim str as string * 5 input "Dame un dato!", str$ 'if you input a 6 character string, this thingie will freeze 'by 1 second, then spit a "Illegal instruction" exception print "Dato: " + str$
Workaround: use a temporary, longer string to read, then trim with left$() 2) string/RT: bounds check missing can cause freezing and/or 68K exceptions if you try to copy a long string into a shorter one: dim str as string * 5 str$ = "Basura" 'program will boom before this print str$
Workaround: same as #1, trim instead of direct-copy 3) CP: undesired space trimming after the end of the stop condition of FOR/WHILE loops: option explicit dim i as integer dim lim as integer lim = 10 'this one works fine for i = 1 to 10 do print i next 'will not compile 'if OPTION EXPLICIT is removed, this var will 'compile as "limdo". Why such space trimming? 'Even worse, it will run until... who knows? for i = 1 to lim do print i next Workaround: remove the "do", anyway, it's illegal (at least in VB) 4) string/RT: in rare cases, when you append strings, there appear some undesired characters at the beggining of the string. This is quite hard to see, but happens in some odd situations. See PLACAMASTER v1.1 sourcecode (PLACAMASTER.BEX line 894+) for a possible testcase Workaround: use right$() to trim (yes, it's RIGHT$()) NOTE: See line 986 for a dataleak related with this bug (undesired variables printed to screen when you print some other var) 5) See line 894 on PLACAMASTER.bex for more odd bugs (i'm unable to reproduce them on standalone files, but if you mess with it, they will attack like wild Pokemons ) 6) IDE: when compiling files on a drive/partition different from where you're running BEX, SNASM68K will not be found! Workaround: load the file, close BEX, then reload it from "Recent" menu, and DON'T OPEN ANOTHER FILE! (use another BEX instance if you need to do so) 7) IDE: when compiling files on a drive/partition different from where you're running BEX, compiled ROMs will be placed on the root directory of the drive, with the name of the folder containing the source file (if it's on a nested folder, like, X:\MOO.68X\CODEX\mio.bex, ROM will be called "X:\MOO.bin", and not "X:\MOO.68X\CODEX\mio.bin", as it should be). Compiled ROMs on BEX drive will have correct names, and will be in the correct paths. 8) INPUT/RT: When reading a integer, if you input a "0" (zero), and then delete it, if you press up, you will see... 1st press: something that looks like greek letter pi 2nd press: lowercase "y" 3rd press: normal sequence (like if you don't have input nothing...) option explicit dim puyo as integer input "Gimme money, sucker", puyo print "Got ", puyo, " beans" Workaround: nothing, the "bad" letters will be read as zeros. At least, this one is not fatal, just... weird
|
|
|
Post by FragHeadFred on Sept 10, 2006 10:02:07 GMT -5
Found an error when trying to use mapped tiles from Imagenesis in BEX 0.26 and 0.21
SNASM68K, version 2.1D, Dec 06 1995, 11:55:16, DOS4G PRO (c) 1993-95 Cross Products Ltd. All Rights Reserved include basicstr.s
basic.s(369) : Warning 22018 : INCLUDE file 'basicstr.s' has zero length dc.b $0000,$0000,$00E0,$00E1,$00E2,$00E3,$00E4,$00E5,$00E6,$00E7,$00E8,$00E9,$00EA,$00EB,$00EC,$00EC,$00EC,$00EC,$00EC,$00ED,$00EE,$00EF,$00F0,$00F1,$00F2,$00F3,$00F4,$00F5,$00F6,$00F7,$00F8,$00F9,$00FA,$00FB,$00FC,$00FD,$00FE,$00FF,$0100,$0000 24- basicdat.s(19) : Error 03007 : Cannot fit value 0x100 (256) into byte dc.b 0000,$0101,$0102,$0103,$0104,$0105,$0106,$0107,$0108,$0109,$010A,$010B,$010C,$010D,$010E,$010F,$0110,$0111,$0112,$0113,$0114,$0115,$0116,$0117,$0118,$0119,$011A,$011B,$011C,$011D,$011E,$011F,$0120,$0121,$0122,$0123,$0124,$0125,$0126,$0000
It starts on the tenth line of the map label and continues to give errors for the remaining mapped lines. Seems to start @ 00E0 and continues to error out. Hope it can be fixed.
Image From Imagenesis Is 320x224, 816 Tiles opt, 16 colors... 256 tiles seems to be the limit for drawtiles when mapping.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 20, 2006 17:03:45 GMT -5
Found an error when trying to use mapped tiles from Imagenesis in BEX 0.26 and 0.21 SNASM68K, version 2.1D, Dec 06 1995, 11:55:16, DOS4G PRO (c) 1993-95 Cross Products Ltd. All Rights Reserved include basicstr.s basic.s(369) : Warning 22018 : INCLUDE file 'basicstr.s' has zero length dc.b $0000,$0000,$00E0,$00E1,$00E2,$00E3,$00E4,$00E5,$00E6,$00E7,$00E8,$00E9,$00EA,$00EB,$00EC,$00EC,$00EC,$00EC,$00EC,$00ED,$00EE,$00EF,$00F0,$00F1,$00F2,$00F3,$00F4,$00F5,$00F6,$00F7,$00F8,$00F9,$00FA,$00FB,$00FC,$00FD,$00FE,$00FF,$0100,$0000 24- basicdat.s(19) : Error 03007 : Cannot fit value 0x100 (256) into byte dc.b 0000,$0101,$0102,$0103,$0104,$0105,$0106,$0107,$0108,$0109,$010A,$010B,$010C,$010D,$010E,$010F,$0110,$0111,$0112,$0113,$0114,$0115,$0116,$0117,$0118,$0119,$011A,$011B,$011C,$011D,$011E,$011F,$0120,$0121,$0122,$0123,$0124,$0125,$0126,$0000 It starts on the tenth line of the map label and continues to give errors for the remaining mapped lines. Seems to start @ 00E0 and continues to error out. Hope it can be fixed. Image From Imagenesis Is 320x224, 816 Tiles opt, 16 colors... 256 tiles seems to be the limit for drawtiles when mapping. i need to fix imagenesis because there's a bug thanks for showing me the bug is where it is trying to fit a word value into a byte space (eg: dc.b $FFFF will not fit in a byte because $FFFF is a word. a quick fix for this is to change all the "dc.b" into "dc.w" inside the map file there's no such thing as bounds checking in basiegaxorz, and there will never be such a thing in the future . bounds checking takes more cpu time and makes programs slower, so if you need bounds checking, you'd need to do it manually, eg if len("abcdef")<whatever then. i guess you'll need to do it after input statements, but i may try to implement a way for the programmer to specify how many characters the user can input, so they wouldn't need to use bounds checking. i've never seen for loops use "do" ;o probably a limit on the compiler i'll try to see if i can extend it 100 arguments is too many! 100 is the limit for basiegaxorz all other bugs mentioned, i'll have to look at later and fix. i'll try to posty again my reactions on these bugs
|
|
|
Post by FragHeadFred on Sept 21, 2006 8:41:41 GMT -5
Found an error when trying to use mapped tiles from Imagenesis in BEX 0.26 and 0.21 SNASM68K, version 2.1D, Dec 06 1995, 11:55:16, DOS4G PRO (c) 1993-95 Cross Products Ltd. All Rights Reserved include basicstr.s basic.s(369) : Warning 22018 : INCLUDE file 'basicstr.s' has zero length dc.b $0000,$0000,$00E0,$00E1,$00E2,$00E3,$00E4,$00E5,$00E6,$00E7,$00E8,$00E9,$00EA,$00EB,$00EC,$00EC,$00EC,$00EC,$00EC,$00ED,$00EE,$00EF,$00F0,$00F1,$00F2,$00F3,$00F4,$00F5,$00F6,$00F7,$00F8,$00F9,$00FA,$00FB,$00FC,$00FD,$00FE,$00FF,$0100,$0000 24- basicdat.s(19) : Error 03007 : Cannot fit value 0x100 (256) into byte dc.b 0000,$0101,$0102,$0103,$0104,$0105,$0106,$0107,$0108,$0109,$010A,$010B,$010C,$010D,$010E,$010F,$0110,$0111,$0112,$0113,$0114,$0115,$0116,$0117,$0118,$0119,$011A,$011B,$011C,$011D,$011E,$011F,$0120,$0121,$0122,$0123,$0124,$0125,$0126,$0000 It starts on the tenth line of the map label and continues to give errors for the remaining mapped lines. Seems to start @ 00E0 and continues to error out. Hope it can be fixed. Image From Imagenesis Is 320x224, 816 Tiles opt, 16 colors... 256 tiles seems to be the limit for drawtiles when mapping. i need to fix imagenesis because there's a bug Ok, I tried that, and now I am back to my original problem... let me start over. When using imagenesis in 15 color,4bpp, 1 plane, 8x8 tiles,optimized. It generates map data like so.. DATAINT_$0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007,$0008,$0009,$000A,$000B,$000C,$000D,$000D,$000D,$000E,$000F,$000F,$000F,$000F,$0010,$0011,$000F,$000F,$000F,$0012,$0013,$0014,$0015,$0016,$0017,$000B,$000B,$000B,$0018,$0019,$001A,$001B,$000D (please note that the underscores prceeding the data are not included in source, and represent a tabbed space) bex compiles fine, but when the rom is loaded in a emulator the image is spaced apart, and is not displayed properly. To get around that I removed the "int" from the dataint in the map data. like so.... DATA_$0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007,$0008,$0009,$000A,$000B,$000C,$000D,$000D,$000D,$000E,$000F,$000F,$000F,$000F,$0010,$0011,$000F,$000F,$000F,$0012,$0013,$0014,$0015,$0016,$0017,$000B,$000B,$000B,$0018,$0019,$001A,$001B,$000D this works fine as long as the map data does not exceed 256 locations, which then I get an error as stated in the previous post. dc.w_$0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007,$0008,$0009,$000A,$000B,$000C,$000D,$000D,$000D,$000E,$000F,$000F,$000F,$000F,$0010,$0011,$000F,$000F,$000F,$0012,$0013,$0014,$0015,$0016,$0017,$000B,$000B,$000B,$0018,$0019,$001A,$001B,$000D I have now tried changing dataint to dc.w as you stated and I do not get an error from bex or the compiler, but.... when loading the rom in an emulator I get the same result as before, the tiles are spaced apart and is not displayed properly. I have included the 3 different sources and the rom to help show what I am doing. If you have any questions please feel free to ask me...... www.filefactory.com/file/b939a7/rar format thanks..................
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 23, 2006 0:47:50 GMT -5
oh, be sure, if you use DATAINT, that you use READINT to read the data. same thing with just using plain DATA, or DATALONG (use READ and READLONG). also, if you use dc.w, you'll need to read the data using READINT. sorry that basiegaxorz cannot auto-detect the data type, it's not possible anyways, or will just eat up more memory.
remember: dc.w, dc.b, and dc.l are assembly language directives, and those should never go inside the actual BASIC code, only in the include file
|
|
|
Post by Jamie on May 22, 2008 17:51:23 GMT -5
I'm currently trying to write a game with your excellent program.
Something seems wrong with the STR$ function.
Try the following:-
val1=10:val2=20 print "TESTING" newstring$=str$(val2) print str$(val1), newstring$, str$(30)
It displays:-
TESTING 10ST 20ST 30ST
It SHOULD display
TESTING 10 20 30
Seems the print command somehow interferes with the STR$ function. If you don't use the print command then STR$ works fine but after using it you get the above problem.
|
|
|
Post by pgsonic on Sept 20, 2008 20:50:24 GMT -5
Four bugs:
1) I can't drag a BEX file into the shortcut icon; I get a runtime error 52 (bad file name or number).
2) I can't associate BEX files on Vista - Error Creating Key.
3) After the Error Creating Key, BasiEgaXorg tries to continue, giving me Error Setting Value and then a success message.
4) I can't use CONSTs with DATA: CONST #x = 1 DATA #x gives me the assembler errorbasicdat.s:2: *** Error: Missing operand *** 002E2A 00 dc.b #x And if I try CONST #x = 1 DATA x I getbasicdat.s:2: *** Error: Symbol 'X' undefined *** 002E2A 00 dc.b x
Anyone know what's wrong here? Thanks.
|
|
|
Post by Mairtrus on Sept 21, 2008 16:37:11 GMT -5
There is only one solution for the first 3 errors: Windows XP. For the fourth, which is exactly what we're trying to do? Once declared a constant, is ready to be used as a value, no need to put it into a DATA segment. For example: const #MyConst=123 print #MyConst ' will print "123" It is understood?
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 22, 2008 14:01:25 GMT -5
Four bugs: 1) I can't drag a BEX file into the shortcut icon; I get a runtime error 52 (bad file name or number). I can probably fix this bug. I think it is a bug with all windows, not just vista I can't test this out because I don't have vista. I'll probably remove the association feature completely inside the program, and make it part of the installer instead This is a problem because the DATA statements do not parse the data. Everything in the DATA statement is parsed by the assembler, and the assembler does not know any BASIC mnemonics. There's no way around this bug for now, and I'll have to spend time working on a new parser for DATA statements
|
|
|
Post by pgsonic on Sept 24, 2008 21:57:47 GMT -5
For the fourth, which is exactly what we're trying to do? Once declared a constant, is ready to be used as a value, no need to put it into a DATA segment. Something along the lines of backgroundmusic: DATAINT #CSharp4, #Quarter, #D4, #Half, #F4, #Quarter, #A5, #Half without having to use the proper values (in this case, PSG values and n/16ths of seconds). Good programming practice, no?
|
|
|
Post by Mairtrus on Sept 25, 2008 12:00:16 GMT -5
Yeah, this is good, but impossible to do due the M68000 ASM.
Wait a minute... I'm talking shit. This IS possible in ASM, as far I remember. At least, you can asign the content of DC.X statement to the content of another DC.X, right?
Devster, why some of those ASM tricks can't be did in BEX?
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 25, 2008 23:28:31 GMT -5
it is possible to do in assembly it would be something like this: NUMBER_ONE = 1 NUMBER_TWO = 2
dc.b NUMBER_ONE, NUMBER_TWO, NUMBER_TWO, NUMBER_TWO
it isn't supported in basiegaxorz yet because the compiler passes everything to the dc.x directive for instance, doing this in basic: data #one, #two, #three data "Hello World",0 will be copied directly to assembly: dc.b #one, #two, #three dc.b "Hello World",0 basiegaxorz isn't smart with data statements , so i'll have to make a seperate parser for it. the expression parser won't work for this
|
|
|
Post by socram8888 on Feb 14, 2010 11:55:59 GMT -5
movep.l, movep.b, movep.w assembler commands and both WriteP and ReadP gives me the following: Output File: basic.bin Pass 1 Pass 2 basic.s:4: *** Error: Illegal addressing mode *** 0030CC movep.l d0,0(a0)
00001 Total Error(s)
Any way to fix this?
|
|