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.


Topics - matthias1992

Pages: 1 [2]
16
[OTcalc] Z80-Hardware / eZ80 Clock speed
« on: August 07, 2010, 04:43:56 pm »
sda

17
[OTcalc] Z80-Hardware / eZ80 Hardware Discussion
« on: August 07, 2010, 06:34:57 am »
I suggest we discuss here about the best hardware for the eZ80 version. Well, the processor is already pretty much decided isn't it?

  • Processor: eZ80
  • RAM: ?
  • (Flash)ROM: ?
  • LCD: ?
  • LCD Driver: ?
  • Keypad (view details below): ?
  • Linkport (view details below): ?
(S)(D)RAM details: how much ram, how fast/slow read write cycle and which manafacturer?
(Flash) ROM: how much ROM? do we want Flash ROM or just "regular" ROM? read/write cycle? manafacturer?
LCD: resolution? refresh rate? manafacturer? (I keep asking that because we don't want to cheaply made crap that breaks easily)
LCD Driver: buffer size? r/w cycle? manafacturer? compatibilty with LCD (pretty much a must)?
Keypad details: specifically how many keys and seperate keys for letters? or a alpha mode switch like on the TI83/84+(SE)?
Linkport details: do we want a old IO port (probaly not) or mini-usb, or even 'full' usb? and do we want a mini-jack for the sound? or something else? someone even suggested SD-card compatibilty...

I probaly forgot some important stuff but this is all I can think of now.

18
General Calculator Help / Which Nspire?
« on: August 02, 2010, 07:45:00 pm »
I have been tinkering quite a while now about getting a Nspire. Seeing all the amazing stuff Ndless can do with it plus it being programmable in C makes me feel I have to. However since using Ndless on this thing will be my main use what is the best Nspire I can get(not neccesarily the fastest)?

Nspire Clickpad (blue)
Nspire CAS Clickpad (light-grey)
Nspire Touchpad (dark-blue)
Nspire CAS Touchpad (black)

I seem to recall the CAS versions were not compatible with Ndless? Or is my memory playing tricks on me?

Thanks for the advice in advance! Remember I WON'T be using it for math purposes just for development and gaming (how seriously can you take gaming?)

P.s abot gaming, gaming I really mean GAMING, like a game...

Darn I just lost

but,

so did you.

19
TI Z80 / [Basic] SkyBox2D Homescreen Engine
« on: July 21, 2010, 06:20:14 pm »
Well here is a complete suprise release. Sometimes when you have alot of free time (like now) and have some old unfinished projects laying around then sometimes you suddenly finish it.

The engine surely uses a very slow method (matrix based worlds) but I already figured a map compression technique that should ease the pain of the massive size of matrices (not implented in source below). Second, this engine was mostly intended to be used by the beginners in Basic who just want to create a game and not having to go through the process of creating collision detection, movement etc. So here it is! SkyBox2D V1.0!

Code: [Select]
prgmSKYBOX2D
ClrHome
1->L
"_NP[-]+I=*->Str0
prgmSBLEVELS
For(A,1,16
For(B,1,8
Output(B,A,sub(Str0,[A](B,A),1
End
End
2->X:2->Y
Lbl SB
0->K
While not(sum({24,25,26,34}=K
getKey->K
End
X->C:Y->D
X+(K=26)-(K=24->X
Y+(K=34)-(K=25->Y
If sum({4,5,6,7,8,9}=[A](Y,X  // every number in this list is a tile number that is collidable. The next and previous level tiles are non-collidable tiles and are thus left out of this list
Then
C->X:D->Y
End
Output(Y,X,"M
Output(Y-(K=34)+(K=25),X-(K=26)+(K=24),sub(Str0,([A](Y-(K=34)+(K=25),X-(K=26)+(K=24))),1
If [A](Y,X) = 2 or [A](Y,X)=3
Then
L+([A](Y,X)=2)-([A](Y,X)=3)
prgmSBLEVELS
For(A,1,16
For(B,1,8
Output(B,A,sub(Str0,[A](B,A),1
End
End
Goto SB

This code manages five things.
1. It draws the Map that is in [A].
2. It moves and displays the main character (the letter M in this example)
3. It does collision detection
4. It handles going to the next or previous level depending on the tile you step on (tile #2= next level, tile #3 = previous level)
5. It leaves no traces of moving the main characters around. It just copies the previous tile you were on to its original location.

Levels are set up as follows. Create a prgm called SBLEVELS (or name it otherwise in the source above) and insert the matrices. All matrices are 8x16 in size. Every element in the matrix represents a tile at that location. So [A](1,1) = 1 means that the tile pointed to by number 1 is drawn at position 1,1 on the homescreen.
L increments by one if you step on a next level tile and decrements by one if you step on a previous level tile, Therefor this could be level code:
Code: [Select]
If L=1
Then
If not(LDATA(L
Then
1->LDATA(L
Pause "You are in level 1 atm and I wont say it again!"
End
[[....
.....
...
....
]]->A
End
If L=2
Then
If not(LDATA(L
Then
1->LDATA(L
Pause "You are in level 2 atm. This message is only displayed once"
End
[[....
.....
...
....
]]->A
End

IMPORTANT this post is incomplete but I am running out of time and on the other hand couldn't keep my excitement about this engine. I promise to provide additional (required information) as soon as possible.

20
Axe / Total noob question
« on: July 14, 2010, 09:39:17 am »
Yesterday was my first hands on experience with Axe, and I love it! despite the compiled files being nearly 2x larger then the source it is incredibely fast! I do have one problem however, moving sprites. I used this code
Code: [Select]
.SPRITE
DiagnosticOff
10->X->Y
[FFFFFFFFFFFFFFFF->Pic0
Lbl DR
Pt-On(X,Y,Pic0)
Return
Repeat getKey(15)
If getKey(2)
X-1->X
sub(DR)
End
If getKey(3)
X+1->X
sub(DR)
End
End
now instead of moving one pixel left or right the sprite moves 8 pixels. How can I make this one pixel? Am I doing something wrong?

And on a slightly off topic note: I was trying to read The Complete guide to effective Axe by SirCwmp but after page 3 or so there are only blank pages (except the titles of the chapaters) can someone either verify this or upload a non-corrputed version (assuming it is not meant to have those blank spaces)

edit:just another question, how do I display sprites bigger then 8x8 at once? or do I have to make, say, a 32x32 sprite from four 8x8 sprites?
Thanks in advance.

21
My entry for the Axe contest will be an attempt to port this AWESOME game:


I will not stick to the official levels very strictly but I'll try

here is a mockup/eye candy of some spriting I did.

22
ASM / ASM base adress [start adress] in hex
« on: July 11, 2010, 09:45:19 am »
(How) can I write in hex were the program starts?
In normal asm you'd type
Code: [Select]
.org $9D95
but can you define this in hex? or does it depend on the name of the program or how full your memory is? I want to know my base adress because otherwise it is merely impossible to write JP's, JR's and CALL's in hex, and they are quite neccesary...

for example this program:
Code: [Select]
A:
    .db %11111111
B:
     call a
ret
converts to this:
Code: [Select]
FFCD9D95C9
and then to this(??(on second on-calc compilation)):
Code: [Select]
FFCD9893C9
so clearly the base adress changes once I compiled a second time...So I need to determine where in memory the prgm must reside otherwise jumps are impossible to code in hex (and they are quite complicated already because you need to count the bytes from base up to a label)

EDIT:
maybe storing PC helps? altough there is no direct way to do so. Maybe you could force PC to be pushed on the stack and then pop it into variable? however wouldn't that very action influence PC and corrupt it?
Anyone any ideas on how to do this?

23
ASM / Coding ASM by hand
« on: July 11, 2010, 07:22:45 am »
EDIT2: Seemingly my explanation is not really comprehensible because this topic has been viewed alot but 0 downloads so far...
or: is there simply no intrest in this? tell me!

One of the most difficult aspects of asm is its final output. it is just a sheer list of hexadecimal characters. There are some on calc converters that allow you to write ASM but they compile slow and are slow to write in unless you can type blindfolded on your calc. I never tried to code directly in hex but yesterday was my first try and it went suprisingly good! One problem was in looking up all the hexadecimal codes for the commands (i try to avoid bcalls altough they are pretty easy in hex).

So I wrote a program that could look up commands for me. Currently I have a 382 byte string that contains the first 20 commands of TASM80.TAB
It works as follows. It looks up the command in str0 and outputs the correct hex format. BCALL's are yet unsupported since the hex digits are swapped and well..I just ahve not included that yet. If one were to include all the commands into str0 (no bcalls, only the commands) it would take up about 6KB. However not every command is really needed/ a lot used so currently I am writing a Limited instruction set into str0 that has all the basic asm commands. If you however wanted to add a command you'd only need to typ '^' into MASM (that is what my program is called).

Well enough talk lets get down to the action:
Before you boot up make sure you have string 0 declared, if you don't use the supplied string in the attachments just store something like ":" to it.'

As you boot up MASM you get a Command Line Interface (that is a pretty glamourous description of the Input command but enver mind). You can do 4 things from here.

Q              | quits
C              | clears string0
^              | Add a command to the library
[command] | outputs the hexadecimal code for [command]

Q and C are pretty obvious but '^' isnt. Whenever you add a command you are prompted 'C:' and 'H:'.  Make sure you open up TASM80.TAB or something else, just don't make mistakes in the input...some errors are catched but a wrong hexadecimal code might eventually crash your calculator.

C: [type number here][type command here]
H: [type hex equivalent here. lenght of this must be equal to "[type number here]"]

the command is now added to the library (aka string0)
lets for example add the command EX DE,HL

Tasm80.tab says this: EX   DE,HL   EB   1 NOP 1

There are two ways to deduce the number you need to type BEFORE the command. 1 way is to multiply the number BEFORE "NOP" (or ZIX sometimes) by 2. In this case 1*2 = 2 so the number would be 2. The second method is to look at the hex-code. in this case EB = 2 characters long. I highly recommend the first method because sometimes with commands with * in it (which means something like: fill in the blanks with a hexadecimal code of a number).Now we type the command:

C:2EX DE,HL

hit [ENTER]

then the hex equivalent:

H:EB

hit [ENTER]

So now the command EX DE,HL is added to the library. We can now recall the hex code for it by typing:

EX DE,HL

which will print

EB

BCALLS use the following syntax:

EF[last two digits][first two digits]

ClrLCDFull for example = 4540h

in hex that would be:

EF4045

This program is to be a digital replacement for TI83PLUS.INC (not yet) and TASM80.tab
I consider making an app out of it eventually to avoid the use of str0. For the moment however this program must be seen as a quick and easy lookup for Z80 commands.

Feedback and critique are welcome but just remember this is a unoptimized, pre-alpha and around midnight created program which lacks optimization.

EDIT: I think AXE is just perfect for this. it allows to insert large amounts of data without using user ram and it allows me to output to an app. I think I'll have to learn axe then....

24
ASM / 16x16 sprites?
« on: July 03, 2010, 10:43:56 am »
hey there!

I slightly modified the spirte routine from Ti asm in 28 days to support hardware keycode control. The point is if i wanted to display a 16x16 sprite (x,y) then what should I change? I do understand how to make a (8x#) sprite, you just need to modify B for that but how can I make the sprite wider?

Thanks in advance!
Code: [Select]
.nolist
#include "ti83plus.inc"
#define ProgStart $9D95
.list
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
B_CALL(_RunIndicOff)
B_CALL(_GrBufClr)
Show:
    CALL    PutSpr
    B_CALL(_GrBufCpy)
KeyLoop:
LD A, $FD
OUT (1), A
IN A, (1)
CP %10111111
RET Z
LD A, $FE
OUT (1), A
IN A, (1)
CP %11111110
JP Z, MoveDown
CP %11111101
JP Z, MoveLeft
CP %11110111
JP Z, MoveUp
JR      NZ, KeyLoop
; Move sprite right
CALL    PutSpr          ; Erase sprite
LD      HL, xpos
INC     (HL)
JR      Show            ; Draw sprite at new location
MoveLeft:
; Move sprite left
CALL    PutSpr
LD      HL, xpos
DEC     (HL)
JR      Show
MoveUp:
; Move sprite up
CALL    PutSpr
LD      HL, ypos
DEC     (HL)
JR      Show
MoveDown:
CALL    PutSpr
LD      HL, ypos
INC     (HL)
JR      Show
ypos:   .DB     0
xpos:   .DB     0
sprite:
.DB     %10000001
.DB     %11000011
.DB     %01100110
.DB     %00111100
.DB     %00111100
.DB     %01100110
.DB     %11000011
.DB     %10000001
PutSpr:
LD      DE, (ypos)
LD      IX, sprite
LD      B, 8
ClipSprXOR:
; D = xpos
; E = ypos
; B = height
; IX = image address
; Start by doing vertical clipping
    LD     A, %11111111         ; Reset clipping mask
    LD     (clip_mask), A
    LD     A, E                 ; If ypos is negative
    OR     A                    ; try clipping the top
    JP     M, ClipTop           ;
    SUB    64                   ; If ypos is >= 64
    RET    NC                   ; sprite is off-screen
    NEG                         ; If (64 - ypos) > height
    CP     B                    ; don't need to clip
    JR     NC, VertClipDone     ;
    LD     B, A                 ; Do bottom clipping by
    JR     VertClipDone         ; setting height to (64 - ypos)
ClipTop:
    LD     A, B                 ; If ypos <= -height
    NEG                         ; sprite is off-screen
    SUB    E                    ;
    RET    NC                   ;
    PUSH   AF
    ADD    A, B                 ; Get the number of clipped rows
    LD     E, 0                 ; Set ypos to 0 (top of screen)
    LD     B, E                 ; Advance image data pointer
    LD     C, A                 ;
    ADD    IX, BC               ;
    POP    AF
    NEG                         ; Get the number of visible rows
    LD     B, A                 ; and set as height
VertClipDone:
; Now we're doing horizontal clipping
    LD     C, 0                 ; Reset correction factor
    LD     A, D
    CP     -7                   ; If 0 > xpos >= -7
    JR     NC, ClipLeft         ; clip the left side
    CP     96                   ; If xpos >= 96
    RET    NC                   ; sprite is off-screen
    CP     89                   ; If 0 <= xpos < 89
    JR     C, HorizClipDone     ; don't need to clip
ClipRight:
    AND    7                    ; Determine the clipping mask
    LD     C, A
    LD     A, %11111111
FindRightMask:
    ADD    A, A
    DEC    C
    JR     NZ, FindRightMask
    LD     (clip_mask), A
    LD     A, D
    JR     HorizClipDone
ClipLeft:
    AND    7                    ; Determine the clipping mask
    LD     C, A
    LD     A, %11111111
FindLeftMask:
    ADD    A, A
    DEC    C
    JR     NZ, FindLeftMask
    CPL
    LD     (clip_mask), A
    LD     A, D
    ADD    A, 96                ; Set xpos so sprite will "spill over"
    LD     C, 12                ; Set correction
HorizClipDone:
; A = xpos
; E = ypos
; B = height
; IX = image address
; Now we can finally display the sprite.
    LD     H, 0
    LD     D, H
    LD     L, E
    ADD    HL, HL
    ADD    HL, DE
    ADD    HL, HL
    ADD    HL, HL
    LD     E, A
    SRL    E
    SRL    E
    SRL    E
    ADD    HL, DE
    LD     DE, PlotSScreen
    ADD    HL, DE
    LD     D, 0                 ; Correct graph buffer address
    LD     E, C                 ; if clipping the left side
    SBC    HL, DE               ;
    AND    7
    JR     Z, _Aligned
    LD     C, A
    LD     DE, 11
_RowLoop:
    PUSH   BC
    LD     B, C
    LD     A, (clip_mask)       ; Mask out the part of the sprite
    AND    (IX)                 ; to be horizontally clipped
    LD     C, 0
_ShiftLoop:
    SRL    A
    RR     C
    DJNZ   _ShiftLoop
    XOR    (HL)
    LD     (HL), A
    INC    HL
    LD     A, C
    XOR    (HL)
    LD     (HL), A
    ADD    HL, DE
    INC    IX
    POP    BC
    DJNZ   _RowLoop
    RET
_Aligned:
    LD     DE, 12
_PutLoop:
    LD     A, (IX)
    XOR    (HL)
    LD     (HL), A
    INC    IX
    ADD    HL, DE
    DJNZ   _PutLoop
    RET
clip_mask:      .DB     0
.end
.end

Pages: 1 [2]