Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

tquester

25
Posts
5
Followers
A member registered Jul 30, 2023 · View creator page →

Creator of

Recent community posts

Thanks. Where can I find the message?

cool

Great  I would like it. Also you may put the compiled version of the games on your itch page. Work on compiler continues

The falling is complicated, maybe with A/Q for up/down it becomes more playable.

Music playing now. Modified the BEEP r,p to BEEP 0.05,p so that the first arguement is float. r was integer with value 0. Also DATA encoded -12 as 12.
updated the compiler also

Added Sinclair BASIC and Slow Manic Miner to the compiler gallery (link in last comment)

Thanks. I am planning to modify inkey$ so that it returns kempston and multiple keys.
The instruction
rem kempston o p a q m
will tell the compiler the codes for left, right, down, up, fire.

it may return up to three chars like oqm for up, right and fire. So it will be playable in BASIC.

I loaded it with merge "", so that it does not start. 
I have started a gallery for compiled games. If you give me the permission to publish the compiled games I would like to include them. Each entry links to the original, lists some changes (like PAUSE to reduce the speed) or instructions to use float or integer, a GIF and the tap file. Integer is about 30 times faster than float.


ZXBasicCompiler/games/games.md at main · tquester/ZXBasicCompiler

Sure, I am compiling your games in order to find the errors in my compiler.
I think in this case I should issue an error message. However I wonder how the interpreter handles this.

After compiling it crashes in line 685. I wonder why ZX Basic did not complains NEXT without FOR.
685 FOR l=1 TO 4:
     PRINT  AT 19,4; INK 1;l$(l):
     FOR a=1 TO 5:
     NEXT l:
     NEXT a

Thanks,

ZXBasicCompiler/games/sokoban/sokoban.md at main · tquester/ZXBasicCompiler

Nice game. Completed to compile it with my new compiler, it is now very responsive and fast. May I publish the compiled version on my Github Page with link to the original?

I see, the compiler is crashing. In this case, you must find the line which crashes it by adding REM to each line and removing it.
I never tried to disassemble MCoder to see how it works.

I am really impressed what can be done in BASIC. Compiled the games not only gain speed and need a PAUSE to be playable but they also become more responsive.

I do not know how MCoder III is working, but maybe compilers do not like GOSUB f, because in compiled code, there are no line numbers. My compiler creates a symbol table if any GOTO, GOSUB or RESTORE is not a constant and calls a function to find the line and address, some games computed goto and restore for Menus or level loading.

Your code is great!  I added PAUSE 7 in line 100 to keep it playable. In Fact ZAP and UFO where the first working game ever to compile I am still testing and fixing bugs, thanks for publishing you BASIC source codes.

tquester/ZXBasicCompiler: ZXBasic Compiler

Successfully compiled Slow Manic Willy with my new Compiler. Nice code, I learned some new aspects of ZX Basic.

Thanks for all the work in Octo Jam

Though this year have been less entries but we have at least two new compilers, one for c and one for extended octo assembly, some new libraries and a hand full of new emulators. I hope the number of users will rise if we can make Mega Chip8 a replacement for Flash games. The rest ist marketing. We need new programmers, new players but also marketing professionals.

If each memory location contains the number 0..9 than we do not need bcd

: show-score
  v5 := 0 # Coordinates to draw to
  v6 := 0
  i := score
  load v3
  i := hex v0
  sprite v5 v6 5
  v5 += 5
  i := hex v1
  sprite v5 v6 5
  v5 += 5
  i := hex v2
  sprite v5 v6 5
  v5 += 5
  load v3
  i := hex v0
  sprite v5 v6 5
  return

I love the hand writing in the game.

This code implements a 16 bit unsigned int library in octo. It can read and print 16 bit numbers and has the operations add, sub, mult, div and mod

https://github.com/tquester/J-Octo-Chip8-IDE/blob/main/samples/lib/libMath.8o

(4 edits)

Currently I did not talk to John.
There is already a pre-processor that supports :include, I saw it in Timendus test suits.

The compiler is a completly re-written and supports for...next, switch..case, inline math and some commands to enable the sprite and the tile editor to find and modify the data (which is implemented currently for reading from the source code).

I do not have a pre-processor, but with compile to disassembler you can generate a source code that compiles on any octo or chipper compiler. 

Later I will add command line arguments, so that compiler, disassembler, tile and sprite editor and debugger can be used without the ide or in visual studio code.

In order to do this, you need to write a 16 bit math library: addition, subtraction, multiplication, division. The first two are relativly easy, just add the low and the hight byte and add or subtract the carry bit. For multiplication you may use the russian multipication algorythm (see for example https://www.wikihow.com/Multiply-Using-the-Russian-Peasant-Method) which only works by shifting a binary number and addition. Divison works like you divide on paper. You may convert z80 assembly to chip8. For example from here: https://wikiti.brandonw.net/index.php?title=Z80_Routines:Math:Division or for 6502 (https://llx.com/Neil/a2/mult.html) with good explanation of the algorythm.

Lazy Multiplication by 10 can be done by 
x = x + x ; *2
y = x  
x = x + x ; *4
x = x + x ; * 8
x = x + y;  * 10
You have to use your 16bit addition here and work with two registers. There is no lazy divide by 10

If you have all this, you can start decoding the number to decimal. 
The last digit you get by
1. Divide by 10. 
2. Multiply by 10.
3. Take difference. 
Repeat this until the number is 0

You may also work the other way around.
digit1 = x / 1000
x = x / 10
digit2 = x / 100
x = x / 10
digit3 = x / 10
digit4 = x



I am targeting Super Chip 8 with no more than 100 instructions per frame.

My Emulator on ZX Spectrum runs slower but the game is stll playble.

I wrote my own compiler/ide with some language extensions: https://github.com/tquester/J-Octo-Chip8-IDE

For compatibility there is a version that compiles with https://johnearnest.github.io/Octo/