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 - cerzus69
1
« on: December 13, 2011, 11:06:38 am »
That's strange. My test program must not have been working right, because when I went back and changed it a bit, it suddenly started telling me that the second routine doesn't work. Anyway, my new test program seems to agree with this change.
; hldebc = hlc * bde ld (iy+asm_Flag1),b xor a ld ix,0 ld b,24 Loop: add ix,ix rla rl c adc hl,hl jr nc,Next add ix,de adc a,(iy+asm_Flag1) jr nc,Next inc c jr nz,Next inc hl Next: djnz Loop ld e,a ld d,c push ix ; ld c,ixl pop bc ; ld b,ixh
Cool, thanks a lot, indeed it works now!
2
« on: December 12, 2011, 10:43:43 am »
I do have a 24-bit floating-point multiplication routine
saved 2 bytes, 1149 cycles saved by using iy too (and in a way compatible with TIOS, imagine that)
; hldebc = hlc * bde ld (iy+asm_Flag1),b xor a ld ix,0 ld b,24 Loop: add ix,ix rla rl c adc hl,hl jr nc,Next add ix,de adc a,(iy+asm_Flag1) rl c jr nc,Next inc hl Next: djnz Loop ld e,a ld d,c push ix ; ld c,ixl pop bc ; ld b,ixh
Jacobly, are you sure this works because I've been going through the code and it seems to me like the second 'rl c' should instead be 'add carry flag to c'. 2 times 'rl c' per loop seems wrong to me. Could you explain please? Because I've tried it as well in wabbitemu, taking the different input in account, and it is still not doing the right thing.
3
« on: December 10, 2011, 08:26:06 am »
Hey, jacobly, I tested both of your multiplication routines and it doesn't seem like they're doing the same thing... I've tried both of them in my program but they have different results.
4
« on: December 08, 2011, 11:36:52 am »
I wouldn't know where to start, I'm having problems enough with 24bit multiplication...
5
« on: December 08, 2011, 11:19:11 am »
If all the coords are 3 bytes large wouldn't that mean that Ans could possibly be 6 bytes large?
6
« on: December 08, 2011, 10:53:11 am »
Ok, this is a bit of a stretch, but how about square-rooting a 24-bit number Interesting question. I have thought about this myself since I would need to square as well for the Mandelbrot formula. I would just multiplicate normally, but I bet there could be some optimization when both the multiplier and multiplicator are the same. Perhaps you could try something with just 8 bits first to keep it simple and then if it works, work up to 24 bits. EDIT: Sorry, read you question wrong.. thought you meant squaring. Square-rooting would be a little harder I suppose...
7
« on: December 08, 2011, 10:27:12 am »
That's right, because the a 24 bit times 24 bit multiplication can have a result of at most 48 bits or 6 bytes, hence it should be stored in 'hldebc' and not just 'bc'.
8
« on: December 08, 2011, 10:01:41 am »
Thanks a lot jacobly for your reply! So, those 2 routines, are they for floating point numbers or for integers? I assume the latter, but just to be sure Any idea how long they take to complete on average? I could count myself but seeing you talking about saving 1149 cycles makes me think you have an idea yourself
9
« on: December 07, 2011, 08:13:26 am »
I have been looking for two days now to find a z80 ASM routine that multiplies two 24 bit numbers to get a 48 bit result.
I need it because I want to try and make a Mandelbrot set generator for the Ti84+ using Q2.21 Fixed Point numbers.
Now I would try to come up with one myself but if anyone knows of an existing one I'd like to know!
Thanks
10
« on: June 10, 2011, 12:25:14 pm »
Ah, I was right, you are the one! Thanks a lot for sending it to ticalc.org. It was really exciting to see it on top of the front page!
11
« on: April 27, 2011, 02:28:14 pm »
It would be an honor if you did that for me!
Did it.
Thanks a lot, man! I'd vote you up, but I either don't know how to or I can't yet because of my low post count...
12
« on: April 27, 2011, 09:44:10 am »
Wow, this looks really excellent. The graphics and effect really make this game stand out. Fantistic work! =)
Thanks! I think most game programmers out there don't put enough attention to the graphics. For me, those are always pretty important. They add so much to the feel of a game IMO.
13
« on: April 27, 2011, 07:56:39 am »
It would be an honor if you did that for me!
14
« on: April 27, 2011, 06:40:12 am »
Nice. I saw it on ticalc for a while but was not sure if it was the final version. You should really e-mail them because this deserves a front page mention there.
And how would I go about that? I mean I can't just tell them that they should can I? Sorry for the belated reply by the way. I turned the notify on but apparently they ended up in the junk part of my inbox...
15
« on: April 19, 2011, 03:47:38 pm »
Is anything happening with this? I'd love for someone to make a game with these tiles, they're awesome!
|