Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 111 users online: 4 members, 78 guests and 29 bots. Members: 16aroth6, parrotgeek1, zeldaking. Bots: VoilaBot (2), Spinn3r (1), MSN/Bing (1), Magpie Crawler (4), Googlebot (20), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Would you be willing to commit 3 app pages to this game? |
| Yes |
|
94% |
[ 16 ] |
| No |
|
5% |
[ 1 ] |
|
| Total Votes : 17 |
|
| Author |
Message |
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 19 Apr 2012 10:39:36 am Post subject: Surprise: Zelda Progress |
|
|
I am pleased to give you the 675th Zelda topic I have opened on this forum
While I have been fussing over a Ubuntu install and trudging through class, I have secretly resumed progress on Legend of Zelda, Ganon's Rage. At present, I have the Installer, Initialization, Main Menu, About Screen, Splash Screen, Text Rendering Routines, Saving/Opening File, New Game, and Maps done.
Yet to do...The engines... That includes the Sprite Display, Event Scripts and Triggers, Movement Engine, and the AI...
I can handle the Events and Triggers reasonably quickly.
I believe that some others were handling the Sprite Display engine, movement, and AI, although I don't remember who.
In short, once these last parts get done...beta time.
Oh, as an aside: this game looks like it'll be 3 pages, unless I can compress the maps. Even then, it still may be.
Last edited by ACagliano on 19 Apr 2012 10:49:28 am; edited 2 times in total |
|
| Back to top |
|
|
Eiyeron

Member

Joined: 12 Dec 2011 Posts: 158
|
Posted: 19 Apr 2012 10:40:52 am Post subject: |
|
|
Prizm? Ti? I want more informations!
/me drools of impatience _________________
  |
|
| Back to top |
|
|
shmibs

Advanced Member

Joined: 25 Nov 2009 Posts: 230
|
Posted: 19 Apr 2012 11:04:26 am Post subject: |
|
|
he's talking about a z80 flash app _________________

ohithur |
|
| Back to top |
|
|
Sorunome

Expert

Joined: 22 Feb 2011 Posts: 636 Location: Somewhere out there
|
Posted: 19 Apr 2012 11:39:51 am Post subject: |
|
|
Wha, cool! I can't wait to see the final result.
I would also volunteer as a beta tester  _________________



 |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 19 Apr 2012 12:19:22 pm Post subject: |
|
|
Quick question.... Can you conditionalize a bcall or bjump using the flags, like you can with call, jr, and jp.
Edit:
so...is this right
#define b_jumpz(xxxx) jr nz,$+5 \ call 50h \ .dw xxxx
#define b_jumpnz(xxxx) jr z,$+5 \ call 50h \ .dw xxxx
And the c, nc variations done the same way. _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55732 Location: Earth, Sol, Milky Way
|
Posted: 19 Apr 2012 03:58:20 pm Post subject: |
|
|
Yup, that should work fine, except I think that the $+5's should be $+7. call is 3 and .dw is 2, and the jr itself is 2, so that's 7 all together. _________________
 |
|
| Back to top |
|
|
_player1537

Guru-in-Training

Joined: 25 Nov 2009 Posts: 2957
|
Posted: 19 Apr 2012 04:01:12 pm Post subject: |
|
|
$+5 is correct. jr $+0 doesn't take you back two bytes, but instead, leaves you at the end of the jr instruction. The +n part refers to _after_ the jr. And, yes, those are the correct instructions to use, and I believe something similar is in BrandonW's ti83plus.inc or TI's. _________________ http://tanner.myserverathome.com
 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55732 Location: Earth, Sol, Milky Way
|
Posted: 19 Apr 2012 04:15:46 pm Post subject: |
|
|
| _player1537 wrote: | | $+5 is correct. jr $+0 doesn't take you back two bytes, but instead, leaves you at the end of the jr instruction. The +n part refers to _after_ the jr. And, yes, those are the correct instructions to use, and I believe something similar is in BrandonW's ti83plus.inc or TI's. | I maintain that jr $+0 takes you to the _beginning_ of the jr instruction, so that jr $+0 would be an infinite loop (rather than an effective no-op). I'd be happy to be proven wrong, however. _________________
 |
|
| Back to top |
|
|
benryves

Cemetech Expert

Joined: 12 Aug 2008 Posts: 1357 Location: London, United Kingdom
|
Posted: 19 Apr 2012 04:24:08 pm Post subject: |
|
|
| jr $-2 is an infinite loop. As _player1537 pointed out, $ is updated to point to the next instruction before operands are calculated. See Z80 Bits for examples. |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 19 Apr 2012 05:58:42 pm Post subject: |
|
|
As an aside, I found an Archive/Unarchive optimization using this...
Code: bcall (_ChkFindSym)
ret c
ld a, b
or a
bcallnz (_Arc_Unarc)
bcall (_ChkFindSym)
Now, as you can see...the Arc_Unarc bcall occurs only if z is reset, but bcall ChkFindSym occurs twice, regardless. Can I use bcallnz here too? How much of a slowdown occurs as a result of doing that twice?
Edit 2: Oh, btw...is there an easy way of counting bytes in a program's code? I mean XCode can count by lines, but I'm not sure if it can or how to count by bytes.
Also, I'm thinking of trying to RLE encrypt the maps, so that just maybe I can pull in at 2 pages. If so, I need a computer program that can compress a string of bytes and an on-calc RLE Decryption routine. I'm sure there's one of those lying around on here or on omni.
Edit3: Who here was going to help me with the Rendering, Movement, and AI engines? Because that's pretty much all that is left. _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 23 Apr 2012 01:34:26 pm Post subject: |
|
|
When it comes to compressing the maps, I can't seem to work the utilities, between finding the binaries and the fact that im on a Mac. If I post here the data that I need compressed, how trivial would it be for someone to run it through the utilities and post the result back. _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55732 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 23 Apr 2012 01:54:39 pm Post subject: |
|
|
This actually should do what I need
Code:
SaveGame:
ld hl, SaveFilep1
rst 20h
bcall(_ChkFindSym)
jr nc,$+6
ld hl,Defense-Health
bcall (_CreateAppVar)
ld a, b
or a
jr z,$+6
bcall (_Arc_Unarc)
bcall (_ChkFindSym)
ld hl, Health
ld bc, Defense-Health
ldir
ld hl, SaveFile
rst 20h
bcall(_Arc_Unarc)
ret
_________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55732 Location: Earth, Sol, Milky Way
|
Posted: 23 Apr 2012 01:56:57 pm Post subject: |
|
|
Are you asking or telling? And please, for the love of all that is technological, never use $+N jumps. Labels exist for a reason. Also, you either need to xor a right before the ld a,b, or jump directly to the ld hl,Health line.
Edit: And either way you also need to increment de twice; otherwise you're going to trash the size word. _________________
 |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 23 Apr 2012 02:01:29 pm Post subject: |
|
|
| KermMartian wrote: | Are you asking or telling? And please, for the love of all that is technological, never use $+N jumps. Labels exist for a reason. Also, you either need to xor a right before the ld a,b, or jump directly to the ld hl,Health line.
Edit: And either way you also need to increment de twice; otherwise you're going to trash the size word. |
Asking, with some degree of certainty, if that makes any sense. And, what is wrong with a $+N jump? They work, don't they? And yeah I keep forgetting about the size word. And, yeah, I noticed that in alot. Yet I don't understand why its needed? _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1656 Location: Aufhelperstan, Utopian Republic
|
Posted: 23 Apr 2012 02:34:18 pm Post subject: |
|
|
| KermMartian wrote: | | And please, for the love of all that is technological, never use $+N jumps. Labels exist for a reason. |
You don't realize how much I dislike those types of references. LABELS, USE. If you don't have the size of all tops memorized, then you will be forced to look up each op. For ex, random $+12 jumps are killer to understand.
In other words less yelling, nice work on progress! Its always nice to see more flash apps for the z80 calcs. _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 23 Apr 2012 04:02:54 pm Post subject: |
|
|
Well, I don't use those types of jumps for alot, only when I want to do a conditional, and there is a little bit of code in between. So like, where in TI Basic, you would do
If [condition]: Then
// code
End:
code
I do
[condition]
jr [false condition], $+distance to if-false, do block
Then block
Else block
In all other cases I use Labels _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1656 Location: Aufhelperstan, Utopian Republic
|
Posted: 23 Apr 2012 05:08:16 pm Post subject: |
|
|
Hrm, wasn't there a special temp label that you could do, like
$:
...
jr -$
to go backwards and
...
jr +$
...
$:
to go forwards? Also, you can use temp labels. Not sure if your assembler has it, but mine lets me make 5 digit temp labels that can be reused in other routines, like 10001$: _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
ACagliano
Super-Expert

Joined: 08 Feb 2010 Posts: 922
|
Posted: 24 Apr 2012 08:28:54 am Post subject: |
|
|
Ok... anyone here experienced with graphics rendering in greyscale? I need some help with a greyscale smooth scrolling system. I will set up the entry to the engine so that
hl - points to the start of the current map data
de - points to the start of the sprite data
The map data is configured...
1 byte width followed by map data
The sprites are 8x8, and are ordered sequentially, with 2 sprites per tile, so that tile $00 corresponds to sprites 1+2 and tile $01 corresponds to sprites 3+4 and so on. I have $5B sprites. _________________ -ACagliano
Current Projects
Legend of Zelda. "Ganon's Rage"
51% |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55732 Location: Earth, Sol, Milky Way
|
Posted: 24 Apr 2012 11:17:02 am Post subject: |
|
|
| ACagliano wrote: | | Well, I don't use those types of jumps for alot | If you use them at all, you're making your code unmaintainable. All you need to do is insert one opcode while forgetting to update the length of the junk, and you have an instant hard-to-trace bug. Labels are free, use them.
| ACagliano wrote: | | And yeah I keep forgetting about the size word. And, yeah, I noticed that in alot. Yet I don't understand why its needed? | Every program starts with a 2-byte size word, then its contents. Without that, there would be no way to tell how big a program is. _________________
 |
|
| Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.043548 seconds.
|