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

Pages: [1] 2 3 ... 47
1
ASM / Re: 16x16 sprites?
« on: July 03, 2010, 01:17:56 pm »
P.s. I know C is already used elsewere, that is likely to screw it up but i tried to insert a cntr byte by doing:
Code: [Select]
cntr: .db 0but then every time I did this:
Code: [Select]
LD cntr, Cor this
Code: [Select]
LD (cntr), Cit threw a error saying: "unrecognized argument"
The reason that's not working is that the only 8-bit register you can store into/from an immediate address is A.  One way you can get around this is by making "cntr" two bytes instead of one, and then using "ld (cntr), BC".


I also see a few issues with your code, so let's try and tackle them one at a time :)  (The cool thing is that one of them sort of fixes itself and doesn't actually cause a visible problem XD)

- The first is where you put xpos, ypo, and clip_mask.  Although in this case it isn't a problem, under most circumstances it could lead to quite annoying behavior :D
  It's best to put variables like this either at the end of your code or at least somewhere it won't be executed (in the Asm28days example, notice that ypos/xpos/sprite are skipped because of the jr's).  The reason for this is that a db/dw directive will actually insert the numbers into the code.  Even though the programmer knows they just want to use those locations as storage, the processor will still try and execute it as code.  In your case the three consecutive $00's are executed, but since this is the opcode for 'nop' nothing happens.

- The next issue are those "push BC"'s you have.  When you use "call", the address of where to return to is pushed onto the same stack as when you push/pop the 16-bit registers.  This means that when you use "ret", whatever is at the top of the stack is popped and used as the address to return to.  There are a couple places where this will cause a problem:
  1) When running through "KeyLoop", you have BC at the top of the stack so when it gets to the "ret z" it starts executing code starting at the value of BC, which is probably not even part of the program.  You need to be careful when using the stack and make sure there aren't any conflicts with call/ret. 
  2) In PutSpr, the first line is a "push BC" and I don't see any "pop BC"'s before the first ret, so weird things are going to happen there as well.
  I think the best way to fix these problems for your program is to just use some memory location for "cntr" instead of the stack.

I hope this helps ;D  I'm not sure if I got all the bugs, but my computer is being mean to me today so I can't test this on an emulator.

2
Miscellaneous / Re: I'm not dead!
« on: May 19, 2010, 04:59:00 pm »
Thanks guys :)

Welcome back!
What are you majoring in, btw?
I'm double majoring in math (pure, none of that applied crap :P) and physics (ironic, since physics is just applied math XD).

3
C and C++ / Re: My schoolwork got rejected...
« on: May 17, 2010, 09:09:36 pm »
lol epic fail on your teacher's part :D

The disturbing thing is... what part was too complex for him?  The only real differences are the two lines
Code: [Select]
cout << header + 10 * offset << ':' << string << '\n';
offset = (offset + 1) % 5;
The first is fairly straight forward (display "{something}: {what you retrieved}"), and the second is just making "offset" go 0-1-2-3-4-0-1-2-3-4...

[edit] Now that I think about it, for my mathematical software survey ("SoftSurv" for short :)) final project my code had a lot of tricks like that.  I wonder if that's why I got an A in the class (my code was completel crap lol)

4
Miscellaneous / Re: I'm not dead!
« on: May 17, 2010, 07:09:24 pm »
Yay, you're back! :D
* TsukasaZX gives Simplethinker a bag of "welcome back" Tay Zonday brand caschews
Cashews?  Do I *really* have to do this myself?  Okay, fine...

Welcome back simplethinker!  We all missed ya ;D  Here are some complementary special edition Omnimaga rickroll peanuts:

:P

5
Miscellaneous / Re: I'm not dead!
« on: May 17, 2010, 12:22:13 pm »
You scared me! I really thought you quit Omnimaga. Glad you're staying!
And good luck with school. :P Hope you won't be buying a time-travelling machine to be able to attend your lessons/work/whatever-else-you're-doing-extra. ;D
I shouldn't need that.  Once I chose classes I went to talk with each professor to make sure the workload wouldn't be god awful.

And congrats on making staff Silver Shadow!

6
News / Re: Builderboy and Ztrumpet promoted to admin positions
« on: May 17, 2010, 12:13:28 pm »
Congrats guys!  You guys really deserve it ;D

7
I'm not dead!, and as the title says, that's the case ;)

Thanks everyone for all the good luck, though it sucks that I'm just now reading this *after* all the crappy things happened :D 

8
Miscellaneous / I'm not dead!
« on: May 17, 2010, 11:26:26 am »
Hey everyone!

Some of you might have noticed that I dropped off the face of the map a while ago*.  My school schedule got a bit crazy but it finally finished a couple weeks ago.  I was hoping to work on some calc-related stuff so I had something to show, but unfortunately I kept getting side-tracked so all of my projects are exactly as they were all those months ago :(

How has everyone here been?  Any new cool projects?  (You guys have been busy.  I have a feeling it'll take me weeks to get caught up with all the topics/posts :o)


*If anyone wants some nasty specifics about where I was, here are some excerpts from my new book "Semester from hell: what NOT to cram into four months" (available June 3 for $6.66 in a bookstore near you):
- One credit-hour classes:  they're more like 20 hours but they only charge you for one.  I took two. *simplethinker slams his head against a concrete wall*
- Paid research projects:  they take a whole lot of work.  I did two. *simplethinker slams his head against a concrete wall even harder*
- If ever both the regular and backup professors are on sabbatical, don't take the class.  My Quantum mechanics teacher didn't know most of the material and had to bring in a graduate student for some things.  *simplethinker doesn't slam his head into anything; this one wasn't my fault :P*

9
TI Z80 / Re: Elmgon
« on: January 22, 2010, 04:33:41 pm »
Sounds good.  I especially like the penalty for running, even though I tend to abuse running from battles in many games.

10
Miscellaneous / Re: I have become... man.
« on: January 22, 2010, 04:00:07 pm »
Congrats {AP}!  What are you going to be doing now?

11
TI Z80 / Re: Pyoro
« on: January 22, 2010, 03:45:35 pm »
This looks great Quigibo ;D

Welcome to Omnimaga, and feel free to introduce yourself in our Introduction forum.

12
TI Z80 / Re: Elmgon
« on: January 22, 2010, 03:40:36 pm »
Weren't you able to spam a bunch of attacks then wait, then spam a bunch of others?
Good point :'( I think only a few people understood the battle system well enough to abuse it that way (at least everyone I knew), though I suppose it could present a problem in Elmgon and unbalance the battle system.

13
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: January 22, 2010, 02:26:26 pm »
"much better interoperability with TI-Connect"

Does this mean both of them will work simultaneously?
I believe he means files retrieved using TI-Connect can be sent using TiLP and vice-versa.

14
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: January 22, 2010, 01:38:14 pm »
Sounds good :)  I'll try this out as soon as I can.

15
Project M (Super Mario) / Re: Project M Reboot
« on: January 22, 2010, 12:41:05 pm »
Very nice calc84! Project M is somehow getting even better :)  I especially love the animated tiles.

Pages: [1] 2 3 ... 47