Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Arbitrary Code Execution Discussion

Easy tool to make 8F setups - Page 1

Easy tool to make 8F setups

Posted by: ISSOtm
Date: 2017-02-25 12:31:39
[size=14pt]GBz80 to Items : Making 8F setups easier[/size]


[size=12pt]WHAT'S THIS ?[/size]
GBz80 to Items is an online tool that allows you to write 8F item setups very easily.
You just type your code, click a button, and you get an item list. Easy as cake !
It's currently available online at http://issotm.github.io/gbz80toitems3/.

Knowledge of Gameboy assembly is required, this is only intended to replace using The Big HEX List and speed up the process of writing setups.


[size=12pt]I FOUND A BUG ! I HAVE A FEATURE REQUEST ![/size]
No problem ! I have you covered.
If you have a GitHub account, I suggest you go here and create a new issue.
Otherwise, just post your request in the thread. I visit the forums quite often, so I'll probably work on it shortly.

BUG TRACKER
#002  "ld (mem16), a" throws "Line undefined : Invalid operand (mem16) !" Fixed in 3.0.1
#003  "ld a, (mem16)" throws "Line 1 : mem16 isn't a valid 16-bit number !" Fixed in 3.0.1
#004  ldh doesn't work and throws "memAccess is undefined" internal (!) errors Fixed in 3.0.1
#005  Bit rotation instructions throw "reg8.indexof is not a function !" Fixed in 3.0.1
#006  jp mem16 throws "invalid operand $36e0 !"


Legacy stuff :
This is the third version of the compiler I make, and the second I publish.
The old v2 version can be checked out at http://prama-initiative.com/8F/ (version 2.1) and http://prama-initiative.com/8F/beta/ (version 2.2, never finished because shitty code)

Re: Easy tool to make 8F setups

Posted by: Yeniaul
Date: 2017-02-25 13:17:03
My discovery: Opcode "RRC A" breaks it with "Line 1 : reg8.indexof is not a function"
Cryo's discovery: Opcode "ldh [$FF00],a" breaks it with "Line 1 : Cannot read property 'match' of undefined"
We've already broken your converter >:D

Re: Easy tool to make 8F setups

Posted by: Torchickens
Date: 2017-02-25 13:48:10
Thank you for this awesome tool!

Do you know how to use ld ($yyxx), a (ea yy xx)? When I put ld ($d059),a I get an "invalid operand ($d059)" error or for ld (d059),a it erroneously claims d059 is not 16-bit number.

Re: Easy tool to make 8F setups

Posted by: ISSOtm
Date: 2017-02-25 14:45:57

My discovery: Opcode "RRC A" breaks it with "Line 1 : reg8.indexof is not a function"
Cryo's discovery: Opcode "ldh [$FF00],a" breaks it with "Line 1 : Cannot read property 'match' of undefined"
We've already broken your converter >:D

All bit rotation opcodes had a typo in the code (reg8.indexof is no function, but reg8.indexOf is). I fixed it on my local build.
Cryo's problem comes from me implementing the LDH parser at 4am (read : very poorly). I'm working on actually writing the function, not even re-writing it. MEH.


Thank you for this awesome tool!

Do you know how to use ld ($yyxx), a (ea yy xx)? When I put ld ($d059),a I get an "invalid operand ($d059)" error or for ld (d059),a it erroneously claims d059 is not 16-bit number.

You do get an error because I let that form of LD slip by. Since it doesn't match any operand pair it knows, it essentially gives up and throws and "invalid operand" error. Lel.
You code is perfectly valid, btw :)
(GitHub issue)

Also, don't try "ld a, ($yyxx)", I forgot to remove parentheses and thus the code tries to parse "($d059)" as a 16-bit integer. That is also fixed in my debug build. (GitHub issue)

I'm adding those to the GitHub bug tracker and the first post.

Re: Easy tool to make 8F setups

Posted by: ISSOtm
Date: 2017-02-25 18:00:04
Double-post to notify people that version 3.0.1 has been released and it fixes all of these bugs.
Enjoy !