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

Pages: 1 ... 79 80 [81] 82 83 ... 153
1201
ASM / Re: an other assembly question
« on: June 04, 2011, 07:36:41 pm »
I'm guessing that the problem lies in SubFP. I'd probably need to see what that does to narrow down the problem.

1202
Axe / Re: Axe Q&A
« on: June 04, 2011, 07:24:09 pm »
The collision routine will be 7 cycles slower if the y values are in the collision range, but it will be 115 cycles faster if they are not.

Also, if you're aiming for speed, you may want to use this instead of what I originally suggested for the second routine. Optimizing for size and optimizing for speed are two different beasts altogether!

Compared to my size-optimized suggestion: 8 bytes larger, ~1200 cycles faster
Code: [Select]
Lbl W
→{r₂sub(W0)*10*6+(r₁+Vsub(W0))+J+L₃}
Return
Lbl W0
/2/2+1/2
Return

1203
Axe / Re: Axe Q&A
« on: June 04, 2011, 05:28:35 pm »
Very good, padawan Deep Thought. But you still have much to learn to become a jedi master. ;)

10 bytes saved
Code: [Select]
Lbl O
Return!If -r₂sub(O0)
r₃-r₁
Lbl O0
+5<11
Return

3 bytes and ~1250 cycles saved  —  Note: although putting constants last is a good practice, in this case it saved nothing
Code: [Select]
Lbl W
→{r₂sub(W0)*60+(r₁+Vsub(W0))+J+L₃}
Lbl W0
*64+256/512
Return

1204
OmnomIRC Development / Re: Spam?
« on: June 04, 2011, 10:08:47 am »
Are you sure he/his message had nothing to do with it? His real message contained a vertical bar and was something like:

pipe signs cut the line off :P | if i am correct IRC will not be able to see this

I know the OmnomIRC bot had problems with vertical bars in the past.

1205
How much free archive does the memory management menu say you have? I'm thinking you may just have a really low amount free, and Gameboy ROMs are quite large.

1206
Axe / Re: Use calc as a synthesizer
« on: June 03, 2011, 02:01:01 pm »
Interrupts are basically "blocks" of code that are executed thousands of times per second (though it can vary in frequency by how you set up the interrupts).

*hundreds of times per second ;)

1207
The Axe Parser Project / Re: Features Wishlist
« on: June 03, 2011, 01:55:30 pm »
APD is never turned off. It just is incapable of activating unless the OS has control of the calculator, which you can give to it by using getKeyr.

1208
Axe / Re: Axe Tilemapping 4*4
« on: June 03, 2011, 12:46:50 pm »
Fixing a few errors. Also, some reformatting and optimizations. :hyper:

Code: [Select]
.TILEMAPR

.Tileset
[]→Pic0T
[F0F0F0F0]Zeros(4)[F0F0F0F0]Zeros(4)
[C0C0C0C0]Zeros(4)[00000000]Zeros(4)

.Tilemap
[]→Pic0M
[01010101]
[01000001]
[01000001]
[01010101]

While 1
 4*4+Pic0M→C
 16
 While 1
  -4→B
  16
  While 1
   -4→A
   If {C-1→C}
    *16+Pic0T→D
    Pt-On(A,B,D)
    Pt-On(A,B,D+8)ʳ
   End
  End!If A
 End!If B
 DispGraphʳ
EndIf getKey(15)

1209
The Axe Parser Project / Re: Features Wishlist
« on: June 02, 2011, 12:47:41 pm »
Auto indenting

This is the kind of feature you'd want a custom program editor for. It would be incredibly hard if not impossible to achieve automatic indenting with just a hook, and it would probably noticeably slow down the program editor.

1210
ASM / Re: Getting Total and Current Archive
« on: June 01, 2011, 02:28:12 pm »
After a little bit of research and coding, this is what I have come up with! Calling GetTotalArc will return a pointer to a string containing the total amount of user archive. Calling GetFreeArc will return a pointer to a string containing the amount of free archive.

All the routines put together are 76 bytes, which isn't too bad I guess. If anyone knows of any super top secret OS calls that can make this smaller/easier, feel free to suggest them. And before you suggest it, I purposely avoided Disp32 because it doesn't work on all OS versions. Also if I used any calls that don't work on every OS version, feel free to point that out as well.


Code: [Select]
GetTotalArc:
;——————————————————————————————————————————————;
;—> Returns the total amount of user archive as a 7-character decimal string
;INPUTS:    none
;OUTPUTS:   hl=pointer to string (OP3)
;DESTROYS:  af  bc  de  ix
;——————————————————————————————————————————————;
B_CALL($80BA) ;GetHWVer
add a,a
add a,a
ld d,0
ld e,a
ld hl,GetTotalArc_HWValues
add hl,de
jr ConvArc
GetTotalArc_HWValues:
.db (10*$4000)>>24&$FF,(10*$4000)>>16&$FF,(10*$4000)>>8&$FF,(10*$4000)&$FF
.db (94*$4000)>>24&$FF,(94*$4000)>>16&$FF,(94*$4000)>>8&$FF,(94*$4000)&$FF
.db (30*$4000)>>24&$FF,(30*$4000)>>16&$FF,(30*$4000)>>8&$FF,(30*$4000)&$FF
.db (94*$4000)>>24&$FF,(94*$4000)>>16&$FF,(94*$4000)>>8&$FF,(94*$4000)&$FF


GetFreeArc:
;——————————————————————————————————————————————;
;—> Returns the amount of free archive as a 7-character decimal string
;INPUTS:    none
;OUTPUTS:   hl=pointer to string (OP3)
;DESTROYS:  af  bc  de  ix
;——————————————————————————————————————————————;
B_CALL($5014) ;ArcChk
ex de,hl
inc hl


ConvArc:
;——————————————————————————————————————————————;
;—> Converts a 32-bit integer into a 7-character decimal string
;INPUTS:    hl=pointer to 32-bit integer (big-endian)
;OUTPUTS:   hl=pointer to string (OP3)
;DESTROYS:  af  bc  de  ix
;——————————————————————————————————————————————;
rst 20h
ld hl,OP3+7
ld de,10
ld (hl),d
ld b,7
ConvArc_Loop1:
push bc
push hl
B_CALL($80B1) ;Div32By16
pop hl
pop bc
ld a,(OP2+3)
add a,'0'
dec hl
ld (hl),a
djnz ConvArc_Loop1
ld d,h
ld e,l
ld bc,6<<8+'0'
ConvArc_Loop2:
ld a,(de)
cp c
ret nz
ld a,' '
ld (de),a
inc de
djnz ConvArc_Loop2
ret

1211
Art / Re: Need some monochrome sprites
« on: May 31, 2011, 07:51:50 pm »
Here's a clipart-style image, not sure if this is the kind of thing you were looking for.

1212
Axe / Re: White lines in Axe
« on: May 30, 2011, 12:06:44 am »
Currently: none.

You could draw one like this:
Code: [Select]
DrawInv
Line()
DrawInv

But that's a lot of extra time spent inverting the buffer twice for a simple line.

1213
Updated for Axe 0.5.3b. As usual, the updated command information document is attached to the first post.


Changelog:
[NEW] denotes new Axe commands, [CHG] denotes changed Axe commands, and [FIX] denotes Axe commands that haven't changed but have changed/corrected information. Red denotes a bug. Green denotes a change that I deem to be awesome.

  • [CHG] All bugs mentioned in the 0.5.3 changelog fixed
  • [FIX] Changed the notes for the trivial comparisons ≥0, >65535, ≤65535, <0

1214
The Axe Parser Project / Re: Bug Reports
« on: May 28, 2011, 07:28:01 pm »
I personally like the argument syntax as well. I think DispGraph(L3) looks better than L3→DispGraph, too. This would also make DispGraph(L6,L1)rr a possibility. ;D *hint hint*


EDIT: And in response to Freyaday, since Pxl-Command()→Buffer isn't supported, Pxl-On(W,0)→I not only doesn't operate on the bytes pointed to by I, but it stores a value into I, overwriting the value you want it to hold. That's probably why you're not seeing what you want from the copying.

1215
The Axe Parser Project / Re: Bug Reports
« on: May 28, 2011, 06:37:34 pm »
The pixel commands were never updated to support referencing any buffer, so it's not a big surprise that Pxl-Command()→Buffer doesn't work. Although looking at the routine, it definitely could work. I guess Quigibo just hasn't gotten around to adding it yet.

Copy() on the other hand has been around for a long time and has always worked. I'm guessing that it is actually working when you're using it, it's just not working how you are trying to make it work. If you could post a snippet of code showing how you're trying to use it, someone might be able to help you debug it.

Pages: 1 ... 79 80 [81] 82 83 ... 153