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 - ISSOtm

Pages: [1] 2 3 4
1
Axe / Re: Flagged! Axiom
« on: May 11, 2015, 04:03:11 pm »
Your file worked for me. It looks like the problem came from the assembler I was, using (ClrHome's online assembler)

I found an alternative to DevPac8x for my Windows x64, so SPASM gave me a working file (I mean, that correctly replaced tokens on TileM).

I have written a fixed code on paper, it should patch both problems Runer shown up.
It's kinda late right now, I'll compile the code tomorrw.

2
Axe / Re: Flagged! Axiom
« on: May 11, 2015, 04:02:56 am »
I use ld s on absolute addresses, not relative ones... Did I misunderstand ?

Notice each command's code starts with .org 0. This means that all the labels in your code are offsets relative to the start of the code, and the REP_NEXT macro signals that the next 16-bit immediate value is such a relative value to which the actual base address of the code should be added when compiled.

The ABS_NEXT macro signals that the next 16-bit immediate value is an absolute (fixed) value that is not relative to anything and should not be offset.
Oh. Okay :P
I knew about the ".org 0" and its pupose, but didn't understand how the prefixes were supposed to be used.

-> Info : I'm using Axe 1.2.2a. Which one do you use Runer ?

Same.
Still, the token hook doesn't work on my setups (both real and emulated). Could you transfer me your compiled program file to see if the problem comes from my calc or the compilator ? Thanks.

3
Axe / Re: Flagged! Axiom
« on: May 10, 2015, 03:25:00 pm »
Quote
I'm currently porting a big project from BASIC to Axe, and I needed to store flags (for account managing). That's when I realized that Axe lacks bit support ({A}e0 works fine, but there's nothing like 1->{A}e0 to set / reset flags)

Or you can do {A} or value -> {A}  and {A} xor value -> {A} to set/reset a bit (with value from [1-2-4...-128]  :P

As for token hook doesn't working, quickly looking at the source didn't give me apparent errors, but since you use a lot of SMC, it is kinda hard to see  :/ Maybe a more experimented axiom coders could tell, or me taking more time to look/test, but time is precious for me these days  ;D
If time is precious, go along then.

There only is one instruction modified per function, the last one (with all the .db s). It is a bit / set / res n, (iy+nn).
The goal is to write the offest first, then the correct opcode (for ReadFlag( and WriteFlag( only)

The token hook works for me:


The token hook doesn't work on my TiLeM, nor on my TI 84+.
-> Info : I'm using Axe 1.2.2a. Which one do you use Runer ?

As for functions behaving incorrectly, I see two issues in a first look:
  • The code you use to signal that the next address should be replaced actually signals not to replace the next address. The correct signal is $7F. I'd also advise using the REP_NEXT macro provided by Axe.inc instead of producing the signals manually, although some tweaking may need to be done for it to work properly in some assemblers.
  • All arguments are passed as 16-bit values, but you pop some off the stack into af. This puts the low byte (the one you want) into f, not a. You should pop these arguments into a 16-bit register pair and then move them into a.
pop af places the high byte into a ? Strange, ReadFlag( and WriteFlag( work fine for me, but they use some pop af. I'll check that.
I compile using ClrHome's online assembler (DEVPAC8X doesn't work on my computer for unknown reasons), and when using REP_NEXT it pulls an error.
Quote from: AxiomSDK.txt
;    The following prefixes will change the replacement policy:
;
; $7F         Next instruction is a relative address.
; $40,$Offs   Next instruction is a relative address with an unsigned byte offset.
; $49         Next instruction is an absolute address.
I use ld s on absolute addresses, not relative ones... Did I misunderstand ?

4
Axe / Flagged! Axiom
« on: May 10, 2015, 12:39:39 pm »
Hello everyone, ISSOtm here !

After working a lot on TI-BASIC, I came back to play with Axe.
However, I also learnt much thanks to Eeems' Learn Assembly in 28 Days (Kudos to him !)

I'm currently porting a big project from BASIC to Axe, and I needed to store flags (for account managing). That's when I realized that Axe lacks bit support ({A}e0 works fine, but there's nothing like 1->{A}e0 to set / reset flags)
So I finally wrote an Axe library (which turned to be composed of assembly code by 99%), then an Axiom.

It allows to write to and read from 3 groups of 8 flags each using hl. (asm programmers : these are asm_flags1 to 3, as you must have guessed)

The code almost works, but there are two problems : one is that one function behaves incorrectly, the other is that the token hook doesn't work... And I don't know why.
Before posting here the final version, I ask help, mainly for the second problem. I don't understand why the token hook doesn't work at all.

Here is a copy of the source code : http://pastebin.com/VJNdRxMh

5
TI Z80 / Re: To: (Asm programmes AND Notepad++ users)
« on: May 10, 2015, 12:37:20 pm »
Wow, thanks for the quick reply.
I don't see what can be folded, though.

Numbers are properly highlighted (including A-F and a-f being only included when using a $ prefix or h suffix), however there are two bugs that I'm not able to correct due to UDL not allowing me to do so :
First, binary numbers aren't correctly highlighted : %10010110 is colored as intended, but %12345678 is too (whereas it shouldn't)
The other bug is that is a comma follows a number, it won't be highlighted (.db $FD , $CB colors both numbers, but .db $FD,$CB highlights none).

6
TI Z80 / To: (Asm programmes AND Notepad++ users)
« on: May 10, 2015, 12:19:58 pm »
Hello Notepad++ users that are also z80 programmers, ISSOtm here !

I launched myself into assembly programming, and chose Npp as an editor because Windows default Notepad is too "default".
However, I missed the syntaxic coloration, and although choosing "Assembly" language properly colored the comments, the instructions were black.

Thanks to version 6.0 (5.0 ? Don't remember), we are now able to define languages by ourselves.
Quote from: Kevin
That already existed before 6.0 !
Yes, but it used to be extremely basic, sorry. Now we can define keywords as "prefixes", and much more.

So, if you use Notepad++, here are 5541 bytes for you : the z80 coloration file.
Do the following when you have downloaded the file :
  • Open Npp
  • In the Language menu, select "Define your language"
  • In the dialogue box, press "Import..." and find the xml file
  • Restart Npp
  • Now you can access "Asm z80" at the bottom of the Language list !
If you're not happy with the name I've given, re-open the dialogue box, and select Language : Asm z80
Press "Rename", and enter the new name. Restart Npp to load changes.

I've put all instructions (including stuff like sll), and compiler instructions (like #define or .org). However tell me if you want me to add more.
Redistribution ? Of course you can ! As long as you mention my name.

Here is a screenshot taken of me working with the coloration on :

7
Axe / Re: Axe Q&A
« on: May 10, 2015, 11:35:15 am »
Interrupts are on, as the "run indicator" is active while using getKey^^r (tried it)

8
This project is not dead, I am just near an exam, so I can't really work on it.
I am currently fixing the NPC bug which causes render errors, and also working on a pre-implementation of battle systems.
The NPC bug isn't apparently linked to my new custom sprite routine (which is more useful but less general-purpose than the Axe's default one), but instead to wrong data being read. I still wonder why.

The battle system currently only displays the enemy stats and sprite, but the only interaction is displaying a "Hurry, get away !" (<-- Reference to this) unless you have the hidden FIGHTING KIT item.

Screens ? Maybe one day.

9
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 25, 2014, 01:45:04 pm »
I didn't know that forgetting a comma could corrupt entire memory areas. <-- Yes, that was the bug  :thumbsup:
But there is another (graphical only) glitch : when NPC render, sometimes a copy of the player's front sprite appears at an apparently random position (depending little on the NPC position).
Also, when it is in the bottom right quadrant of the screen, the cross NPC doesn't render. At all.

I'm also converting the sprites to the new format ; anyway, because I don't use Pt-Mask( anymore, sometimes I don't anymore need the mask = optimization !
11326 bytes used on a 16384 large app : any suggestions for new features ?

Also, merry Christmas !

10
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 22, 2014, 01:25:04 pm »
Development is being slowed down during holidays, because I want to spend some time with my family.

I think I'm going to use a custom sprite routine (written in a combo of Axe and Hex) to display NPCs.
Here is the code ; I don't know :
1. Is it faster than Pt-Mask()r ?
2. Same question for size ?

Here is an example program, will display a chest which will be used in a near future version :
Code to write
Assembly equivalent (when possible)
What does it mean
SPRITE(0,,Pic5PRITE)
DispGraphClrDraw
getKey r
Return
Just the main code to see what happens
[00000000000000001FF820042004281427E43E7C27E4281420043FFC00000000]->Pic5PRITE
[0000000000000000000000000000000000000000000000000000000000000000]
Note : maybe I made a mistake, this should be exactly 4 lines filled with zeros
Lbl SPRITE
Now correct stuff
r2 *3*2*2*2*2*2+ r1 *2
ld hl, ...
Hl is now the offset to where the sprite should be drawn at
Asm(114093)
ld de, $9340
L6 .equ $9340, so de points to the beginning of the buffer
Asm(19)
add hl, de
hl is now the pointer to the sprite destination
Asm(EB)
ex hl, de
because de must be the destination and hl the source, swap these (hl will be set later)
Asm(DD)
r3
ld ix, r3
ix will be the source, so it points to the sprite
Asm(0610)
ld b, $10
There are 16 lines, so 16 iterations
11
ld hl, 11


spriteloop:
Now the main loop
Asm(1A)
ld a, (de)
Load the current pixels to apply masks
Asm(DDA620)
and (ix + $20)
Apply transparency first
That's also why I use ix and not hl
Asm(DDB600)
or (ix + 0)
And now put sprite pixels.
Asm(12)
ld (de), a
And put it on the buffer.
Asm(13)
inc de
Go to the next byte both on destination...
Asm(DD23)
inc ix
... and source.
Asm(1A)
ld a, (de)
Load the current pixels to apply masks :
Asm(DDA620)
and (ix + $20)
Apply transparency first ;
That's also why I use ix and not hl, I can't give a fixed offset with hl.
Asm(DDB600)
or (ix + 0)
Now, add sprite pixels
Asm(12)
ld (de), a
And put it on the buffer.
Asm(DD23)
inc ix
Go to the next byte on source...
Asm(EB)
ex de, hl
... but destination is a little bit trickier.
Asm(19)
add hl, de
We need to change de but not hl ; we should then swap these.
Asm(EB)
ex de, hl
Swap both again, and de now points to the next line.
Asm(10E6)
djnz PC + $E6
that's to spriteloop
Nothing
ret
Axe automatically add a Return at the end of the program.
Saves 1 byte.

11
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 10, 2014, 07:14:54 am »
You can bypass the 8811 byte code limit, just use an axiom like fullrene or crabcake and it will run on any 83/84+ without crashing.
Yeah, I know, but aren't 16k programs a bit large ? (yes, I am planning to make RPG Lite weight 16kb)
* ISSOtm wonders how CrabCake works...

EDIT: Just skimming through quickly, I found some stuff like this:
Code: [Select]
:Copy(GDB7NPCS,L1)
This won't work, because when you compile the app, the data in GDB7NPCS is set in stone and can't be modified because it's part of the app. My bet is if you changed everything like this to utilize free RAM areas or some temporary appvars, most of the errors would go away.
No, it will work, because it copies data FROM GDB7NPCS to L1 (which is is RAM, because I sometimes edit NPC data)

And with the way Axe compiles apps vs. programs, you have to change the code a bit to work. (eg. you can't change data in GDB's in apps) I'll take a look and see if I can find anything. :)
RIGHT ! There is the bug ! It is because I didn't read Axe command list correctly <_<
Quote from: Quigibo in Axe command list
nib{EXP}    Returns the EXPth nibble in RAM. Use this to access external data in RAM. Since there are twice as many nibbles as bytes, make sure pointers are multiplied by 2.
nib{EXP}r     Returns the EXPth nibble in RAM, or ROM if compiled as an application. Use this to access internal data. Since there are twice as many nibbles as bytes, make sure pointers are multiplied by 2.
When I was using ASM programs, I used nib{}. When this code was compiled to app, it looked for data... in RAM, not the app.
Thanks for help, now it works !

CHANGELOG :
 ! Now compiled as a 16kb app !
 + Added a pickaxe and a breakable wall !
 + Added a maze !  :w00t: < Where am I ?? |
 + Added an option to "Fast-Forward" the game (actually uses Axe's Full function)
 + Added an option to reset the save while in-game (before, it needed either save hacking or to manually delete the save fie)
 + Added some kind of tutorial level
 + Now with ladders ! :o
 * Fixed a bug with the "dig landmark" cross not appearing upon resetting save, but appearing when re-starting the game.
 * Fixed a bug with the save text not being cleared when cancelling save procedure
 * Introduced bugs, I think  ;D

The files are coming as soon as the pickaxe and ladders are fully implemented and (mostly) debugged.

[EDIT] Done, but I'm currently adding the inventory. It is almost finished, I just need help from a friend to finalize the item sprites

12
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 08, 2014, 01:47:33 pm »
Do you plan to make this a Flash app or program in its final form?
Oh ! I was planning to announce this ! :P
...Yeah, it seems that I'm going to need compiling as an app
I finally reached THE limit : my calc refuses to run the program, it is too large (8713 bytes raw, + 14 header bytes = 8727, hey, I thought it was possible to run programs up to 8816 bytes large).

Quote from: Quigibo
There is also an option to compile to applications. This uses very hackish code and may not work on all models of calculator so be cautious when using this feature as this is the one that can cause archive corruptions if the it fails to write the application correctly.
I'm making a backup ;)

Now, I am just afraid of one thing : the Archive is actually Flash Memory, and if it is as the SSDs, it can be only written to a limited amount of times (I found 100,000, can anyone confirm ?). I don't want to make it un-erasable !


[Compiled once...]
Wait, it looks like the map is corrupted. Sprites, too ? Oh.

[Compiled twice...]
Wait,  Axe displayed "Size : ROBOT" (which is the name of the Omnicalc font I'm using) ?
The game IS corrupted D: , not the source, but the app went mad.

[Compiled again, unarchived the source...] <-- Yes, that changed the app
There is DEFINITELY a problem. I uninstalled Omnicalc, to see if that fixes anything.
No way. The sources are on Dropbox, can anyone try to see where is the problem ? Maybe it is just Axe that fails.

13
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 04, 2014, 12:32:11 pm »
Very nice so far, looking at the scrreens. Gonna try the game when I have computer access. :)
Thanks !
If you try the game, you will "finish" it quite quickly, I need to make a better scenario / bigger map  :P ( Note : remove this when game is completly coded)

Progress :
Currently working on :
  • The cross that spots the key disappears when it is taken   > DONE
    It is also saved in the file, actually I implemented the save of NPC visiblity
  • A better animation when unlocking the locked door in the garden   > DONE
  • Removal of some now unused code   > DONE
  • Optimization on checking whether you should be able to walk or not on the target tile,   > DONE (and another one is being done)
    that should also make movement smoother.   > The script is faster only when the tile you try to walk on isn't walkable
  • Expanded scenario and map !   > BEING DONE
A bit more than 7200 bytes
Found (one) strange bug : when selecting Enter to start the "Save" sequence, if you press Enter before the text appears, it will not process the save sequence, but instead trigger the interaction script. Unknown reason.
I think others will follow (der:P)

14
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: December 03, 2014, 09:25:12 am »
Glad to see this still progressing! :) but the screenshots give me 404 not found :(
ISSOtm: you seem to be using Dropbox as your image host. When you do that, please make sure you put the images in the public folder and copy the links from there. Currently, they seem to be in a non-public location because I can't see them (Dropbox gives me an error saying I'm not allowed to view those files, so your images will probably only show up to you and not anyone else).
Moved the files,
here are the screenshots !
Spoiler For Screenshots:
Sorry if the screen sometimes garble, it doesn't happen on my calc, but on TileM it occurs

Your very first screen !



Interactable signs !



Door warping !



Dang. A locked door.



Save and reload !



Isn't there something ?



Now with NPCs !

Spoiler For Cheating device:
Updated to display more data !



Example : warp to an out of bounds location which displays a glitched terrain

WARNING : Pressing Enter in this kind of zone may lead the game into interpreting garble data as tile interaction, and will trigger invalid routines (you may freeze the game, make it return with a ERR:SYNTAX (don't know which RAM address is called at that time) or just crash / freeze the game with a RAM clear)



Enter a different area with exactly the same graphics and interactions, but without warps or NPCs


Example : kind of walk through walls cheat

If you enter a zone you usually can warp only if you entered aan odd number of doors with having entered and even number of doors (and vice-versa), you will stay on the doors after warping.
This is because a flag is changed when walking through a door.

This now works differently, so this glitch doesn't work anymore !


Little screen you might encounter ;D

Spoiler For Walkthrough part 1:

Spoiler For Walkthrough part 2:

Spoiler For Walkthrough part 3:

Spoiler For Walkthrough part 4:
Coming when this part of the game will be released !

Here is the new file link !




Currently working on :
  • The cross that spots the key disappears when it is taken
  • A better animation when unlocking the locked door in the garden
  • Removal of some unused code
  • Optimization on checking whether you should be able to walk or not on the target tile,
    that should also make movement smoother.
  • Expanded scenario and map !

15
TI Z80 / Re: [Axe] Puzzle pack (for those of you who are bored in math...)
« on: November 29, 2014, 09:37:48 am »
Development is going on, bugfixes and bugs came with it, as did NPCs !
Saves created with old versions may give strange bugs.
I recommend :
1. Delete save file
2. Use Cheating Device to set MapID to 0, and fix other strange values by yourself.
Remember : the save length changed !


Changelog (Kinda) Or Comparison With My Last Post
There are a few graphical glitches, but because I didn't copy data correctly ;D
Maybe I am too lazy to fix the pixels when the guy looks right (even if he looks right more often than left), but the door graphics are now correct !

I also released a cheating device, which can't edit data while the game is running, but can hack the save after execution.
There now is a very strange bug with it : when you open it, it changes save data even if you don't open the save file  :thumbsup:
[EDIT] Fixed, but another bug has been introduced, and it makes the game unplayable.
Release is delayed.

Isn't there something ?

Now it is made differently :
1. It is not possible anymore to walk on it
2. It will be possible to remove the cross when digged, and then to walk on where it was.
    I just need to be less lazy and implement NPC state save


A small glitch (fixed in my development build)

I FIXED IT !!! YAY !!


Example : rotate your guy without changing its target tile

Now, it does NOT change the tile it is "looking" at, I mean pressing Enter will still trigger the tile you were looking at before "manually" rotating. It is saved in another part of the file


If you enter a zone you usually can warp only if you entered aan odd number of doors with having entered and even number of doors (and vice-versa), you will stay on the doors after warping.
This is because a flag is changed when walking through a door.
Nope ! Now it works differently.
This kind of glitch isn't possible anymore  ;D




Wait, I just need to find the files on my second computer, and they'll be disponible along with new screenshots !

Pages: [1] 2 3 4