Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - obj04

Pages: [1]
1
ASM / Re: Pokémon Neptunium
« on: April 13, 2020, 11:38:55 am »
I made a grass tile.
It has 3 possible background colors, for a grass, mud, or snow terrain.
Actually, it should look like one of the grass tiles from Pokémon
generation 3 & 4, but now I think it kinda looks like a hemp leaf...
What do you think? Do you have some better ideas?



By the way, the image preview is upside down, for some reason.

Edit (Eeems): merged double post

2
ASM / Re: Pokémon Neptunium
« on: April 08, 2020, 01:51:24 pm »
Jump labels etc. are marked by ::, e.g.:
Code: [Select]
infinite_loop::
jp infinite_loop
What's the reason for going with :: instead of the standard :

There's no special reason. I just took it over from a code example.
Furthermore, I'll be able to add : for file-level jump labels.

3
ASM / My ASM compiler
« on: April 08, 2020, 10:37:06 am »
Nice project! This reminds me of the time when I tried to build a pokemon clone for the nspire with a few friends. It never went anywhere. :P Good luck, I hope you'll get further than we did.

Thanks, I have a good feeling about my project, because I currently don´t have very much other things to do.
But I´ll probably need some help when I have to invent some Pokémon names.
I´m not very creative in creating fictional names in English... x.x



For all people interested in my homebrew compiler:

If you want to test my compiler, make sure to have micropython and nTxt installed.

Then create the following files/directories:
Code: [Select]
/documents/
|- DevBoy/
   |- compileASM.py.tns (<- you can find this file in the attachments)
   |- project/
   |  |- main.asm.tns
   |
   |- global/
      |- opcodes.inc.tns
      |- inc/
         |- asm/
         |- bin/


The opcodes.inc file follows this structure (you´ll have to insert all opcode-mnemonic-assignments you want to use *.*):
Code: [Select]
00 = nop
76 = halt
7F = ld a,a
3A = ld a,(**)
3E = ld a,*
CB 07 = rlc a
* means a 1-Byte value or address
** means a 2-Byte value or address


You can use the following compiler commands in your source files:
  • #define alias value - replaces all occurences of alias with value in the compilation process.
  • #include <xyz> - includes the global library global/inc/asm/xyz.asm in your project.
  • #include "xyz" - includes the project-level library project/xyz.asm in your project.
  • .db $CB,$07 - inserts hex CB07 at the current position in the bytearray that is to be written into the ROM file. .db $CB,$07 would be equivalent to rlc a.
  • .org $015A - makes the compiler continue writing the compilation results into the rom file at position hex 15A. See the example below.
Code: [Select]
; This is the file "main.asm".
; The ROM starts at pos $00, logically.
.db $FF   ; Write 1 byte to pos $00 ==> pos will be incremented by 1
          ; pos is now $01
.org $02  ; Jump to pos $02 (skip pos $01)
.db $EE   ; Write 1 byte to pos $02 ==> pos will be incremented by 1
When you compile this, your ROM file will contain the following 3 bytes: \xFF\x00\xEE


Jump labels etc. are marked by ::, e.g.:
Code: [Select]
infinite_loop::
jp infinite_loop


If you want to insert some immediate values, i.e. as command parameters, you have the following options:
Code: [Select]
ld a,%10010101 ; load binary 10010101 (=149) into register a
ld a,$95       ; load hex 95 (=149) into register a
ld a,#149      ; load decimal 149 into register a
If you use the .db command, you can insert an ASCII string too (e.g. .db "Hello World").

Edit (Eeems): Merged double post

4
ASM / Re: Pokémon Neptunium
« on: April 08, 2020, 02:32:50 am »
I would be interested to get some more information on the assembly compiler you wrote.

It works like this:
  • Split the source file into an array of code lines and replace "#include <xyz>" by an array of code lines of "xyz"
  • Remove comments
  • Create a list which contains all jump-labels and aliases
  • Convert every line of code into it's opcode, followed by it's arguments, e.g. "nop" -> 0x00, and insert the results into a bytearray
  • Replace all aliases by their values
  • Write the bytearray's content into a file

I hope this is what you wanted to know. :)

5
ASM / Re: Pokémon Neptunium
« on: April 08, 2020, 12:32:38 am »
"thanks to Zeda" ===> "Zeda said that the map and names it looked cool"

That is genuinely cool stuff, I'm quite impressed with that compiler and development right on the nspire, great work!

I wrote this because you had the idea to name some of the cities after electronic components   :)

6
ASM / Pokémon Neptunium
« on: April 07, 2020, 02:56:14 pm »
Hey calculator community!

A while ago, I made a Pokémon Yellow savefile editor.
I explored the world of Pokémon 1st Generation glitches until it became boring.
Somehow, I found an online article about ROM-Hacking which made me think about making my own game.
I decided to write my game for the Nintendo GameBoy Color :crazy: , because I happened to have gbc4nspire installed on my Nspire.
Are you shocked because I mentioned my Nspire? :o
Hold on, the best is yet to come.
I had to write my own Assembly compiler in Micropython!  :w00t:
And - it works just fine, although I just cobbled some more or less sensible classes together...
My game does not do very much yet. This could be caused by the fact that I only had some GameBoy (not GameBoy Color) docs to learn the GBC development.  :banghead:
But I already finished the overworld map, great thanks to Zeda.  :)
You can find my map draft in the attachments.


Stay cool everyone. See ya!

7
General Calculator Help / Re: TI nspire cx (non-cas) Red screen problem
« on: February 29, 2020, 07:47:01 am »
I had this problem too, but It happened after downgrading to 4.2 (I used BtMg to reset "minOS" before).
I fixed it by upgrading my nspire back to 4.5.
But I don´t know how you can reset "minOS" without any working OS.  :-\

8
General Calculator Help / Re: Problems with the file system
« on: February 29, 2020, 07:32:01 am »
Oh, thanks!
I didn`t know someone made another version of Ndless Commander...  :o
When I tried to delete files with the official version, I realized it doesn´t provide this function x.x

When I press the <delete> button, the screen gets scrambled, but somehow it works anyway. :thumbsup:

Thank you very much for your help!

9
General Calculator Help / Problems with the file system
« on: February 21, 2020, 08:17:27 am »
Hi everyone,

I did some experiments with micropython on my TI-nspire CX CAS
and forgot to append the .tns extension to some files...
Consequently, I can‘t see these files.
I already tried to delete the directory, in which they are located, but the directory reappears when I refresh the „My Documents“ screen.
Currently, my /documents folder contains 4 unnecessary subfolders, which I can‘t delete (I renamed them to "write-protected trash 1-4").
I even tried to remove them with TiLP2, without any success.

Does anyone know how to get rid of files with missing .tns extension,
without using the „Delete Document Folder contents“ option from the maintenance menu (doc+enter+EE)?
Thank you very much!

Pages: [1]