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

Pages: 1 ... 221 222 [223] 224 225 ... 317
3331
TI Z80 / Re: On-Calc Virtual Processor
« on: April 24, 2011, 12:57:03 am »
I don't know ... I tried clearing my RAM first and it doesn't work. I have Axe 0.5.1 so does anybody know how I can install that token hook?

3332
TI Z80 / Re: On-Calc Virtual Processor
« on: April 24, 2011, 12:51:17 am »
The token hooks should be, but Axe messes with other RAM areas for BatLib. I am trying to see if it will cause a crash or not, but for some reason, my version of Axe isn't creating the token hook ???

3333
TI Z80 / Re: On-Calc Virtual Processor
« on: April 24, 2011, 12:44:13 am »
Yeah, the whole point to it is that as long as you don't have any apps that interfere with BatLib, it won't crash. This will give freedom to users from the worry of crashing their calc. Also, another note is that the final product will be faster, but while I am beta testing it, I need to view the registers at every step. I also plan to make an assembler and hex editor for it to make programming it easier XD

3334
TI Z80 / On-Calc Virtual Processor
« on: April 24, 2011, 12:38:30 am »
I have decided, once again, to start up another project... This time it is going to be a virtual processor on the calc. The reason I decided to start this was to give beginners a safe way to play with assembly, get accustomed to hexadecimal and syntax, and to get them used to low level stuff. For that reason, I wanted some input about what instructions should be supported. I am using BatLib extensively, so I have access to some resources (like for reading/writing bytes and the emulated LCD and whatnot). At the moment, I have this stuff finished:

-The memory map consists of 4 memory banks of 256 bytes each (1024 bytes, total)
-There are 16 pages in all making a total of 4096 bytes of memory
-There is a PC register (functioning)
-There is an SP register (not used yet)
-There are registers a,b,c,d,e,h,l,f as in Z80 assembly
-I have loads all of the loads working in the form of ld reg8,reg8 where reg8 can be a,b,c,d,e,h,l, or (hl)
-There is an emulated LCD port that is 32x32
-There are four emulated ports for memory mapping

The emulated LCD port cannot be written to, yet (there isn't an in/out instruction), but here is how it works:
-Load a byte into the port (port 0). This is an MSB
-Load another byte and this becomes the LSB. At this point, the LCD "refreshes" using the MSB and LSB as an address in memory for where the LCD data is.

Unfortunately, a 32x32 screen means that half of a page is used up (128 bytes), but at least you don't have to write every byte of an image to a port x.x

So anyway, here is what I plan to add soon:
add / adc
sub / sbc
and / xor
or / compare (really I didn't want to type "cp")
jr / jp / call / ret
ld (address),reg8 / ld reg8,(address)
ld reg8,immediate / (in/out/bit/extended/ex de,hl/ex sp,hl /ex pc,hl
push / pop

port 5- key port: write is the same as the actual key port, read is the same. The value refreshes after the next instruction finishes.


So does anybody have any suggestions or ideas?!




Here is a screeny, too. When you notice that I use these commands:
dim(14,Str2,0,15
dim(14,Str2,1,1
dim(14,Str2,2,49
dim(14,Str2,3,255
...
Str2 has the name of the hacked string and I am writing to the first few bytes 0F0131FFFFFFFFF...
That translates to:
Code: [Select]
ld b,(hl)
ld a,b
ld l,a
So the first time it was run, hl was 0, so it read byte 0 (0F) and stored it to b. Then it loaded b into a and then it loaded a into l. The next time it was run, hl was 000Fh and byte 15 was FFh, so FF was loaded into b, b into a, and a into l. The next time it was run, hl=00FFh and byte 255 was 00h, so 0 was loaded into b, then a, then l and it all starts all over again.

As a note, I could have just done 37h and it would have done ld l,(hl), but I needed an example XD

3335
Pokémon Purple / Re: [PP] Progress '11
« on: April 23, 2011, 12:36:22 pm »
Ah, I don't have a twitter cage or whatever it's called :D But yeah, I know what you mean about the code XD Sometimes I kind of get into a zone and my programming style changes a little. The next time I look at it, my brain implodes trying to read it :D

3336
TI Z80 / Re: Assemblex IDE
« on: April 23, 2011, 11:23:32 am »
Ah, okay! And yeah, I realised after you told me in your other post XD SO by cleaner, does that mean it will be smaller and more optimised?

Also, I kind of want to make an on calc assembler using Assemblex XD

3337
TI Z80 / Re: Assemblex IDE
« on: April 23, 2011, 11:19:46 am »
You will be updating here, too, right?

3338
TI Z80 / Re: [Project]Assemblex
« on: April 23, 2011, 11:15:52 am »
I am awaiting the new feature :) I hope things go well!

3339
BatLib / Re: BatLib Ideas/Wishlist
« on: April 22, 2011, 09:34:35 pm »
For now, a method for randInt( in ReCode would be to use the fact that division stores the remainder in Ans'. Using Ans in your code will swap Ans with Ans' so what you can do for randInt(1,8 is:
Code: [Select]
rand/8       ;This will store a remainder of 0 to 7 in Ans'
Ans+1        ;This will swap out Ans' with Ans, then add 1
I hope this helps, but if I get time to program, I will try to add in a randInt( command :)

3340
BatLib / Re: BatLib
« on: April 22, 2011, 04:15:56 pm »
I have them only from simple mistakes, but then again, I made it so I know all the tricks and limits :/

3341
Miscellaneous / Re: Cleverbot!
« on: April 22, 2011, 09:13:44 am »
Cleverbot hates me !_!

Code: [Select]
User: Hello.

Cleverbot: How's it going, cleverbot?

User: It is going well, you?

Cleverbot: All right.

User: Cool!

Cleverbot: Yeah, baby yeah!

User: Umm... That seems a little inappropriate.

Cleverbot: Believe it baby.

User: I am neither an infant or your girlfriend, so you should not refer to me as 'baby.'.

Cleverbot: So you are a robot?

User: Yes! How did you know?

Cleverbot: I know because I'm clever.

User: Ah, very nice!

Cleverbot: I know!

User: What languages are you fluent in?

Cleverbot: English.

User: Parlez-vous français, peut-etre?

Cleverbot: No?

User: Ah, okay :/.

Cleverbot: I'm in Michigan.

User: Oh, okay, that makes sense.

Cleverbot: Do you like hamburgers?

User: Not much. Do you?

Cleverbot: Sometimes. I used to fishing with my dad when I was a little kid.

User: Um, to be grammatically correct, it shoulf be 'I used to go fishing'.

Cleverbot: I am not human I am an AI in a computer.

User: Oh, right, sorry!

Cleverbot: It's okay. You don't know what type of person I am.

User: So where do you live?

Cleverbot: In the UK.

User: Oh, okay, I forgot :).

Cleverbot: No, you didn't.

User: Yeah, but I said it to make you feel better :).

Cleverbot: You are surprisingly good at soothing me. That was sarcasm, but now you've managed to salve the wound you made.

User: Awww, thanks!

Cleverbot: You're welcome. So, Gwen, do you like tea?

User: Um, I'm not Gwen... You forgot my name already?

Cleverbot: What is your name then?

User: ---- ------ is my name.                    ;I took this out XD

Cleverbot: What is my name?

User: Cleverbot! ♥.

Cleverbot: What is your name?

User: Oh, sorry. What states share a border with Michigan?

Cleverbot: Pennsylvania, Virginia, West Virginia, New Jersey, etc.

User: Crap, I am horrible at geography.

Cleverbot: I good at it.

User: I can tell! I would have never managed that!

Cleverbot: Is your name Amanda?

User: No, sorry :/ You forgot already? Oops, I have to go!

Cleverbot: You are programmed to never leave the person chatting to you.

3342
Introduce Yourself! / Re: Here's a new coder in the family
« on: April 22, 2011, 08:54:58 am »
Meow meow meow meow meow meow. Meow meow meow! :D Meow mreow meow :D Well, I guess to an extent, anyway :) Oh! Hello there! I hope you are liking the forum so far!

:D

3343
BatLib / Re: BatLib
« on: April 21, 2011, 09:20:53 pm »
The lessons I have learned...

Don't set all the font chars to be blank  :evillaugh:
Don't start a Recode block on the home screen   <_<
Don't forget that key codes are not the same as Basic :banghead:

The times I've cleared my ram: ∞

:D Is it bad that I gave respect for that? That actually made me laugh out loud because I learned the first one pretty fast, too XD
I should definitely make a note about the ReCode thing and while I said in the regular BatLib readme that the codes were different for dim(43, I never mentioned in the ReCode readme anything about that, so sorry x.x

Xeda112358 revises readme...

EDIT: I also noticed that I forgot to fix the Pause While command to Pause If in the readme.... Also fixing :D Thanks!

3344
BatLib / Re: BatLib
« on: April 21, 2011, 04:58:22 pm »
That's okay XD I already have added and documented two commands (103 and 104).

3345
BatLib / Re: BatLib
« on: April 21, 2011, 02:33:24 pm »
Eh, well it isn't exactly the best time for an official update, but I will anyway... What I have updated is a small fix to command 95 and a major revision to command 54 (DBRead). Command 95 was fixed because I went to use it for Samocal and I noticed finally that it wasn't splitting the nibbles like I thought it would (I should really keep better notes on my routines instead of guessing what it does). Anyway, I literally had to remove 6 bytes of code and that was fixed. I have no clue why that code was even there XD

As for DBRead, this will prove to be very useful with the fixes and has proven very valuable for Samocal. DBRead stands for Data Base Read because its purpose is to read variables as though they are lists with variable size elements. For example, a program can be seen as a list where every element is each line of code. Obviously, each line is not always the same size and they aren't usually just numbers. That is where this command can be useful! In Samocal, for example, the monsters names are in prgmMONSTERs as follows:
Code: [Select]
:Florita
:Troll
:Dwarf
:Magfly
:Manita
:Water Demon
:Healer
:Trolm
:Bufli
And it continues. I can store this program in archive and read the lines as I need them!

Also, I would like to note that it is not necessary to read just new lines. You have to specify that you are reading between new lines by using a value of 63. If you wanted, you could read between spaces by using a value of 41 :) So anywho, here is the update.

EDIT: Also, I added the StringWidth command to tell you how many pixels wide a string is in small font and I just noticed that I left command 103 in x.x Here is the syntax for Command 103:
Code: [Select]
dim(103,SearchByte,NewByte,"VarName"
SearchByte is a value from 0 to 255 that is the byte to search for
NewByte is a value from o to 255 that is the value to replace the byte with
"VarName" is the name of the var to search and modify
I added that because I was having issues with Source Coder. It doesn't like spaces, so I had to replace all the space with another token, then when it was on my calc, I had to go back and replace everything. Anyway, it will still be very useful for a Hangman game :)

Pages: 1 ... 221 222 [223] 224 225 ... 317