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

Pages: 1 ... 46 47 [48] 49 50 ... 55
706
...and just as quick ;)

707
ASM / Re: My first 68k asm program: a small sprite routine
« on: June 18, 2012, 09:37:39 am »
...so i tried displaying another sprite afterwards and it gives me an address error (i've come to dread those words, i see them all the time). I'm not sure why, is it maybe because i'm using byte-sized commands and maybe i fill one of the registers with a word or long that doesn't get cleared? I can't see where the problem might be...

EDIT: Ah.. it's the parameters i'm passing to the routine, there must be a mistake in there somewhere. I'll look through the code again...
EDIT2: So i don't get it. The first time through i XOR a byte to $4E58 (well within LCD_MEM) without a problem, the second time through it bugs out on $4E58. Does it have to be word-aligned or something?

708
eZ80 has pretty much everything I'd want. LD HL,(HL) ftw
A little bump, but ld hl,(hl) would have been great.

709
News / Re: TI: A step back towards the TI community?
« on: June 18, 2012, 04:52:40 am »
The main thing keeping me from getting any of their newer calculators is the "lack" of native assembly support. To be honest, having a color screen to play with sounds like a lot of fun, but being locked out of assembly (and, by extension, C), just sucks.  I think that was always one of the biggest attractions of their calculators: browsing the massive amounts of programs available and then learning to program them and do things you thought you never'd be able to do. That and knowing that a large number of people would have immediate access to and actually use/enjoy your programs. I guess for ARM programming there are a lot of other communities/platforms out there, i guess you'd just reach a different audience.

The 82-83+ (even the 89) will always be special to me, but not because of the math problems i solved on them ;) Programming them was the reason i bought my first (and second, and third, and fourth, etc.) calculator :P
Actually the Casio PRIZM, which has a color screen, a bit more RAM and archive, has ASM support. :D It isn't intentional by Casio, but they have said if we play nice they'll let us use it. :)
Really? I've never looked much at the Casio calculators but that actually sounds really cool, i may end up picking one up :D Now you've got me reading up on SH3 assembly :)

710
News / Re: TI: A step back towards the TI community?
« on: June 17, 2012, 03:41:58 pm »
The main thing keeping me from getting any of their newer calculators is the "lack" of native assembly support. To be honest, having a color screen to play with sounds like a lot of fun, but being locked out of assembly (and, by extension, C), just sucks.  I think that was always one of the biggest attractions of their calculators: browsing the massive amounts of programs available and then learning to program them and do things you thought you never'd be able to do. That and knowing that a large number of people would have immediate access to and actually use/enjoy your programs. I guess for ARM programming there are a lot of other communities/platforms out there, i guess you'd just reach a different audience.

The 82-83+ (even the 89) will always be special to me, but not because of the math problems i solved on them ;) Programming them was the reason i bought my first (and second, and third, and fourth, etc.) calculator :P

711
ASM / Re: Enemies and objects
« on: June 14, 2012, 06:22:50 am »
Well, when a level is loaded the entire level is loaded. I could set a certain distance to remove (delete) an object from the list, as i've never really liked resetting enemies back to their original positions when they go offscreen. I remember you talking to me about how you had objects and enemies set up in Super Mario a couple years back, maybe over at RevSoft?

712
ASM / Re: Best IDE for TI 83+ Asm???
« on: June 13, 2012, 09:01:04 am »
I just use WabbitCode for linux for its syntax highlighting (and code counter :D) then have a simple script that compiles the code, loads tilem2, runs a macro, and automatically executes my program :) WabbitCode for windows has that built-in, but it takes a while to load WabbitEmu each time and it doesn't execute your program automatically.

713
ASM / My first 68k asm program: a small sprite routine
« on: June 13, 2012, 02:41:03 am »
Last night i spent several hours writing a really simple sprite drawing routine. I'm curious if anyone could give me any comments or suggestions on the code. For some reason, i had a lot of trouble trying to rotate the pixels from one register into another so i just doubled the size of the sprite  :-[ (initially i was using all bytes)
Code: [Select]
move.b #0,d0 | X
move.b #20,d1 | Y
lea spriteBox,a1
jsr drawSprite

movea.l AMS_jumptable,%a5 | load the AMS jumptable to a5
movea.l 4*ngetchx(%a5),%a5 | ngetchx()
jsr (%a5)
bra exit


|----------------------------
| drawSprite: draw a sprite to LCD
| d0 = X position
| d1 = Y position
| a1 = sprite location
drawSprite:
move.b d0,d2 | save X coord
and.b #0x07,d0 | how much we need to rotate the sprite
mulu #30,d1 | i think the screen is 30 bytes wide?
lea LCD_MEM,a0 | start of LCD_MEM
add d1,a0 | add the Y offset to a0
lsr #3,d2 | shift d2 (xCoord) right 3 bits
add d2,a0 | add X offset to a0
move.b #7,d2 | display 8 rows
screenLoop:
move.w (a1)+,d1 | put the byte of data into d1
lsr.w d0,d1 | rotate byte of data 'd0' bits to the right
eor.w d1,(a0) | xor (ExclusiveOR) the byte (well, word) into a0 (the LCD)
lea 30(a0),a0 | shift down a row
dbra d2,screenLoop | it's beyond me why d2=7 will draw 8 rows... it must break on -1?
rts

spriteBox:
.byte 0b11111111,0
.byte 0b11111111,0
.byte 0b11100111,0
.byte 0b11000011,0
.byte 0b11000011,0
.byte 0b11100111,0
.byte 0b11111111,0
.byte 0b11111111,0
It's also kinda weird that the dbra/deq both break on -1 and not 0. Being able to rotate a byte by X/register number of bytes is pretty cool, though :D How exactly does that work? Will rotating a byte 5 times take longer than rotating it 3 times? I assume so, but i don't know anything about the size/speed of 68k instructions... I also don't know if "lea 30(a0),a0" is faster than "adda #30,a0", but i like being able to use all the address registers sort of like the z80's index registers (ix/iy).

And, the LCD: it took me a long time to get the sprite drawn right, the screen is 160 pixels wide, or 20 bytes, why does it seem like it's 30 bytes wide? How many bytes tall is LCD_MEM? Could you use the bytes to the right of the screen for smoothscrolling in a tilemapper, for example? Next up, a simple tilemapper :D

I may have asked this before, too, but why do numbers (except addresses?) need to be prefixed by a pound (#) sign? At first i thought it was to signal a decimal value, but later i realized you need to put it before all numbers.

And does anyone have a list of saferam areas for the 89? Is there a graph buffer somewhere?

714
Miscellaneous / Re: French people, unite!
« on: June 10, 2012, 07:01:25 am »
I dont think Omni has lots of members from the Asian area ?
I'm living in (but not from) China right now :)

715
ASM / Re: Getting around the 8000 limit without using apps
« on: June 09, 2012, 11:07:58 am »
Cool, thanks! I've never really touched the VAT, archive, or any of this stuff, for now it's just to test out the game more easily (or more lazily) so really it doesn't matter TOO much if i corrupt the RAM during run-time, but this will be nice if/when it gets released :) What exactly are you copying the first time through, just the size of the program? What are the extra 9 bytes at the end (+3+3+3)?

And calc84maniac, i assume you would just load that code to saferam somewhere and run it from there.

716
ASM / Re: Getting around the 8000 limit without using apps
« on: June 08, 2012, 01:22:50 am »
Haha thanks. By the way, this will only let the program use up half the RAM, right?

717
TI Z80 / Re: ORG: online Z80 IDE and assembler
« on: June 07, 2012, 12:20:47 pm »
I'm pretty sure it's just a French localised version of the 83.

718
ASM / Re: Getting around the 8000 limit without using apps
« on: June 07, 2012, 11:34:04 am »
Cool, i never knew about that "feature", thanks for the info. I decided to just write a little launcher to not have to load up DCS/Mirage/zStart every time i want to test it out, it doesn't delete the allocated memory afterwards so i guess it's just for emulators, but:
Code: [Select]
#include "includes/ti83plus.inc"
#include "includes/ion.inc"
.org progstart-2
.db t2ByteTok, tasmCmp

ld hl,debut_routine
ld de,gbuf
ld bc,fin_routine-debut_routine
ldir
jp gbuf

debut_routine:
ld  hl,programme_a_executer
rst 20h ;mov9toop1
bcall(_ChkFindSym)
push de ;de = debut du data
ex de,hl
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ;premiers deux octets = taille du programme
ld de,$9D95 ;charger a $9d95
push hl
bcall(_InsertMem)
pop bc ;taille du programme dans bc
pop hl
inc hl
inc hl
inc hl
inc hl ;sauter la taille du programme et deux autres octets que je ne sais pas ce'qu'ils font
ld de,$9D95
ldir ;ldir "bc" fois
call $9D95
ret
programme_a_executer:
.db ProgObj,"PROGRAM",0
fin_routine:

And now everything is (or appears to be) running fine :)

719
ASM / Re: Getting around the 8000 limit without using apps
« on: June 06, 2012, 07:26:58 am »
I'm having trouble with the 8.8k limit and don't have any executable code after this. Running from Mirage works fine, but the homescreen gives me an error ("ERR: INVALID"). The data isn't even used in the program yet. Any ideas?

720
ASM / Re: Enemies and objects
« on: June 06, 2012, 01:21:04 am »
Well, right now i've got my data set up like this:
Code: [Select]
;ENEMY EQUATES (pour utiliser avec ix)
MECHANT_SPRITE = 0
MECHANT_X = 1
MECHANT_XOFF = 2
MECHANT_Y = 3
MECHANT_YOFF = 4
MECHANT_XVEL = 5
MECHANT_YVEL = 6
MECHANT_HP = 7

MECHANT_SIZE = 8
liste_de_mechants:
; .db # sprite, mechantX, mechantXOff, mechantY, mechantYOff, xVel, yVel, HP
; m1 S X XO Y YO XV YV HP
.db $5, 12, 0, 7, 0, 0, 0, 1
; m2
.db $0, 6, 2, 4, 0, -1, 1, 1
; m3
.db $0, 4, 3, 3, 1, -3, 1, 1 ; carré
; m4
.db $4, 7, 4, 4, 1, -1, -1, 1 ; sorte d'oeil
; m5
.db $0, 6, 5, 4, 4, 0, 2, 5
nombreMechants:
.db 5
...and modify those values each frame. I realize that if i add in a lot of enemies later on, loading them all at once will slow the game down quite a bit (though it'd have to be a LOT of enemies). When an enemy is killed, i just shift all enemies below it up one. Basically, i'm curious how you store and process your data, for example whether it's worthwhile to keep track of offscreen enemies or remove them from the list. I think giving the map the ability to create (spawn) enemies would make the map routine much more powerful would give you code to easily reuse in other places, for example if you want a boss to be able to toss out enemies at you or something.

Pages: 1 ... 46 47 [48] 49 50 ... 55