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 ... 69 70 [71] 72 73 ... 317
1051
« on: March 14, 2013, 11:03:42 am »
Wow, awesome, and thanks! What I was thinking was that maybe there could be a place where an external program could pass the location of the source data in HL and the size of the source data in BC, or something like that. I was also thinking of making a small font editor for editing BASIC programs so that the source would look neater, so that could help. This would also make it easier to use lowercase letters.
1052
« on: March 13, 2013, 07:34:10 pm »
If I go with having a prefix byte, I will have ind1() and ind2() so that it can be specified which byte has indirection performed on it. It wouldn't make any sense to use indirection ont eh second argument of something like ldc() since that would be equivalent (but slower and larger) to lda().
1053
« on: March 13, 2013, 05:09:09 pm »
I forgot to mention that I pulled out chicken for dinner, too, so, WINNER, WINNER, CHICKEN DINNER!
1054
« on: March 13, 2013, 04:51:15 pm »
The new-new test works for both of my calculators
1055
« on: March 13, 2013, 03:51:35 pm »
I edited my first post. Both calculators passed.
1056
« on: March 13, 2013, 11:02:34 am »
We need indirection, don't we? Gah, I cannot believe I forgot to add that in. Do you have any suggestions on how it could be implemented. I was thinking maybe add a few more instructions like ldi(), addi(), adci(), ... ? Those would use the second argument for indirection, so something like ldi(tempbyte,offsetptr) would read the byte at offsetptr to figure out where to load a byte from and store it at tempbyte.
EDIT: In reply to your edit, that is a brilliant idea o.o that should remove 9 bytes of code, I believe and make it run faster.
It actually removed 12 bytes, nice!
EDIT2: I have added in indirection for some of the instructions, but the way it is implemented, you cannot execute instructions conditionally. I could change this by making a byte indicate that the next instruction is indirection. Then it would be possible to execute them conditionally.
1057
« on: March 13, 2013, 10:34:07 am »
Yes, that is how it works, and it should wrap around. Also, I just tested it and it worked It isn't all that fast, but it works! Here is the code: spriteX = stackbase-1 spriteY = stackbase-2 tilenum = stackbase-3 .org 0 ldc(keyMask,255) ldirc(160,96) ;tilemap data ;drawn by column .db 1,1,1,1,1,1,1,1 .db 1,0,2,2,2,2,0,1 .db 1,0,0,2,2,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,0,0,0,0,1 .db 1,0,0,2,2,0,0,1 .db 1,0,2,2,2,2,0,1 .db 1,1,1,1,1,1,1,1 ldirc(sMSB0,4) .db 1,96,0,2 ldc(sMask,1) TileMap: ldc(sY0,64) subc(sX0,8) jrfc(Start) TileMapLoop: subc(sY0,8) jrbc(TileMap) pop(tilenum) rotl(tilenum) rotl(tilenum) rotl(tilenum) addc(tilenum,tiles) lda(sLSB0,tilenum) orc(status,2) jrb(TileMapLoop) tiles: .db 0,0,0,0,0,0,0,0 .db 3Ch,42h,81h,81h,81h,81h,42h,3Ch .db 3Ch,7Eh,$FF,$FF,$FF,$FF,7Eh,3Ch Start: ldc(stackptr,0) orc(status,1) ldc(status,80h)
1058
« on: March 13, 2013, 10:04:53 am »
Hmm, I thought of a clever trick:
-copy the map to the end of the stack (so make sure the last byte is at address 255) -Save the stack pointer -Set the stack pointer to 0 -use pop() to read the bytes quickly, drawing the appropriate sprite. You can do 8 sprites at a time, so maybe draw whole columns at a time? -Set the stack pointer back to what it was
Also, I am going to start getting in the habit of storing other info like coordinates to stackbase-1, stackbase-2, and whatnot.
1059
« on: March 13, 2013, 08:59:44 am »
What do you mean draw a string? Just print text? I also tested out AsmDream but i just can't get used to its syntax, i think for now i'm going to stick with the computer
Yes, that is what I mean about the text. And yeah, the syntax does take some time to get used to . I wonder if there is a way to get Mimas to work nicely for it. EDIT : Also, what instructions can currently be used with c/z flags? To make defining things easier, we could do something like: lda = 0 adda = 1 adca = 2 ;... etc. c = 64 z = 128 ;... #define lda(addr1 , addr2) .db lda,addr1,addr2 #define ldac(addr1 , addr2) .db lda+c,addr1,addr2 #define ldaz(addr1 , addr2) .db lda+z,addr1,addr2
#define adda(addr1 , addr2) .db adda,addr1,addr2 #define addac(addr1 , addr2) .db adda+c,addr1,addr2 #define addaz(addr1 , addr2) .db adda+z,addr1,addr2
#define adca(addr1 , addr2) .db adca,addr1,addr2 #define adcac(addr1 , addr2) .db adca+c,addr1,addr2 #define adcaz(addr1 , addr2) .db adca+z,addr1,addr2 ;etc.
Every instruction should be able to be used with the c and z flag, I just didn't finish including all of them in the .inc file yet. EDIT2 : So i've been trying to figure out how to get a simple tilemap working but i can't think of how to do it without registers Here's what i've got so far, a fake tilemap setup:
That looks really nice! What do you mean that you cannot get it to work without registers? Do you mean you cannot get it to work without using RAM? That is the only way that I can think of doing it. I plan to look at your code and try my own hand at it, too, because that does look nice.
1060
« on: March 12, 2013, 10:20:14 pm »
For my 84+ (it has 8 RAM pages), it returned 69,128. The second program crashes the calculator.
For my 84+SE (3 RAM pages), it returned 85, 128. The second program caused the calculator to freeze on the homescreen after displaying Done.
EDIT: With the new code, both calcualtor's pass.
1061
« on: March 12, 2013, 09:51:06 pm »
Wow, that animation is very cool o.o I cannot remember how I generated my strings, but I think I did some clever trick to make it fast and not repeat.
Actually, I remember now o.o
1062
« on: March 12, 2013, 09:12:45 pm »
Apparently we can post screenshots since that round is done (I asked nikitouzz).
1063
« on: March 12, 2013, 09:11:34 pm »
1064
« on: March 12, 2013, 06:16:33 pm »
Thanks and fixed
1065
« on: March 12, 2013, 06:13:13 pm »
So for my TI-Concours BASIC (z80) entry, you can see what it looks like below. We were supposed to make Mastermind, so I put the core of it together with a custom graphscreen input routine. I made it return smileys for correct numbers and positions, ? for correct numbers, bad positions, and an X for numbers not in the code. Then I made sure that the maximum number of allowed turns was 12 and I decided to make a fancy-ish main menu. It draws three main objects in random locations every setup and I made sure it wouldn't interfere with the menu. What is more, my program doesn't tamper with window settings, so even if you press ON, your window settings are preserved as well as Axes, Grid, and the like. The only thing the program modifies is it turns off the graphs and plots.
Pages: 1 ... 69 70 [71] 72 73 ... 317
|