-
Content Count
3,144 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by Willsy
-
Exactly, that's what I was getting at. There's no point in setting L< and A< *after* the instruction executes, since the value will ALWAYS be positive (or 0)! Still, the ED/AS manual goes 'round the houses as usual instead of just damn spelling it out!
-
Thanks guys. I used xor to do what I needed. I like xor
-
Does ABS set the flags such that it tells you the sign of the number BEFORE conversion to positive? The explanation in Editor Assembler is rather obtuse, as usual. Mark
-
Indeed, but the XB object loader is at least half the speed of the ea3 loader, maybe three to four times slower!
-
Yep - XB EA3 is MEGA slow. I don't know why. Maybe Rich or Tursi can shed some light on it. Mark
-
Light pen, via the joystick port. Though you don't really need a scan line interrupt at all for a light pen, and none exist for the TI anyway.
-
Interesting! I'll try and do a version for TurboForth when I have the time. What does the word R do? Mark
-
Actually, that's a pretty neat idea!
-
I think the actual values it comes up with are fine for a pseudo random number generator. The only issue is performance. For games etc, one is often generating random numbers inside a loop, so performance is an issue. In the end I added an assembly RND routine to TF which so far seems to give good results, and is of course much faster. It seemed sensible, since I think a number of folks will want to try their hand at using TF for game development. Regards Mark
-
Yeah! I actually managed to run it in a VM. It runs and I can execute simple code on it. Can't get it to do much else though
-
Ha! The machine the girl is using is a 4A but the on-screen stuff is a sinclair zx spectrum!
-
50 FOR NEXT But probably better to put it into it's own routine. A value of about 500 seems about right... : DELAY 500 FOR NEXT ; I also switched MOVE-FROG and DRAW-FROG around. Much better movement now... I didn't notice before as it was all a bit too fast...! Mark 23 VALUE X 1 VALUE C1 4 VALUE C2 8 VALUE C3 12 VALUE C4 35 CONSTANT FROG 36 CONSTANT CAR : SETUP 1 GMODE \ 32 COLUMN MODE 17 4 DO I 15 1 COLOR LOOP \ SET COLORS HEX DATA 4 1899 7E3C 3CBD FF5A DECIMAL FROG DCHAR HEX DATA 4 66FF DBDB DBDB FF66 DECIMAL CAR DCHAR ; : DRAW-FROG X 11 FROG 1 HCHAR ; : MOVE-CARS 12 C1 32 1 HCHAR C1 1+ 32 MOD TO C1 12 C1 CAR 1 HCHAR 14 C2 32 1 HCHAR C2 1+ 32 MOD TO C2 14 C2 CAR 1 HCHAR 16 C3 32 1 HCHAR C3 1+ 32 MOD TO C3 16 C3 CAR 1 HCHAR 18 C4 32 1 HCHAR C4 1+ 32 MOD TO C4 18 C4 CAR 1 HCHAR ; : MOVE-FROG KEY? CASE 69 OF X 11 32 1 HCHAR -1 +TO X ENDOF 88 OF X 11 32 1 HCHAR X 1+ DUP 24 = IF DROP 23 THEN TO X ENDOF ENDCASE ; : FINISHED? X IF FALSE ELSE ." WELL DONE!" TRUE THEN ; : DEAD? X 11 GCHAR CAR = IF ." YOU'RE DEAD!" TRUE ELSE FALSE THEN ; : DELAY 500 FOR NEXT ; : RUN SETUP 23 TO X BEGIN MOVE-FROG DRAW-FROG MOVE-CARS DELAY DEAD? FINISHED? OR UNTIL CR ;
-
HA! XB Compilers... Pussies! Real men do it in FORTH FORGET X 23 VALUE X 1 VALUE C1 4 VALUE C2 8 VALUE C3 12 VALUE C4 35 CONSTANT FROG 36 CONSTANT CAR : SETUP 1 GMODE \ 32 COLUMN MODE 17 4 DO I 15 1 COLOR LOOP \ SET COLORS HEX DATA 4 1899 7E3C 3CBD FF5A DECIMAL FROG DCHAR HEX DATA 4 66FF DBDB DBDB FF66 DECIMAL CAR DCHAR ; : DRAW-FROG X 11 FROG 1 HCHAR ; : MOVE-CARS 12 C1 32 1 HCHAR C1 1+ 32 MOD TO C1 12 C1 CAR 1 HCHAR 14 C2 32 1 HCHAR C2 1+ 32 MOD TO C2 14 C2 CAR 1 HCHAR 16 C3 32 1 HCHAR C3 1+ 32 MOD TO C3 16 C3 CAR 1 HCHAR 18 C4 32 1 HCHAR C4 1+ 32 MOD TO C4 18 C4 CAR 1 HCHAR ; : MOVE-FROG KEY? CASE 69 OF X 11 32 1 HCHAR -1 +TO X ENDOF 88 OF X 11 32 1 HCHAR X 1+ DUP 24 = IF DROP 23 THEN TO X ENDOF ENDCASE ; : FINISHED? X IF FALSE ELSE ." WELL DONE!" TRUE THEN ; : DEAD? X 11 GCHAR CAR = IF ." YOU'RE DEAD!" TRUE ELSE FALSE THEN ; : RUN SETUP 23 TO X BEGIN DRAW-FROG MOVE-FROG MOVE-CARS DEAD? FINISHED? OR UNTIL CR ; http://www.youtube.com/watch?v=W2UXBasc8jw Don't be afraid to ask questions if you want to know how the code works! Mark
-
Maybe its a bug in the compiler. Try this as an experiment: 192 A=C(1):: IF A=31 THEN A=1:: C(1)=A Repeat this for c(2) to c(5) Let us know what happens.
-
You can have 32 Sprites on a line if you want with the F18A. It is set with a jumper. However, *if* the *software* (game etc) is looking for 5 or more Sprites on a line then you will still see flicker, as the *game* will be moving the Sprites on and off the screen very fast (which makes them flicker) to try to get around the 4 on a line restriction. There is nothing the f18 can do about this: it can only obey the commands given to it by the host software.
-
Have a look at scuba dive on the zx spectrum for some beautiful animated under-water graphics...
-
yes, Guillaume Tello is the author of MLC. Perfect french Guillaume is a nice guy - shame he's not over here on AA.
-
Here's mine - buried inside the TF ROM ;[ GPLLNK ; This routine is based on the routine published in the July 1986 edition of ; Smart Programmer. Modified by yours truly to allow it be executed from ROM. gplws equ >83e0 ; GPL workspace gr4 equ gplws+8 ; GPL R4 gr6 equ gplws+12 ; GPL R6 stkpnt equ >8373 ; GPL stack pointer ldgadd equ >60 ; load and execute grom address entry point xtab27 equ >200e ; low mem XML table location 27 getstk equ >166c ; cpu register data - this data is copied into >200e onwards, so that it sits ; in R7 onwards gpllnk data glnkws ; [mapped to R7] set up BLWP vectors data glink1 ; [mapped to R8] rtnad data xmlrtn ; [mapped to R9] gxmlad data >176c ; [mapped to R10] GROM address for GPL XML 0F27 opcode data >50 ; [mapped to R11] Initialised to >50 where PUTSTK ; address resides ; this routine runs in it's own workspace, starting at >2000 glnkws equ >2000 ; GPLLNKs workspace of which only registers R7 thru R15 ; are used glink1 li r0,gpllnk ; we need to copy the cpu register data (above) to li r1,>200e ; RAM. R0=Source, R1=Destination li r2,5 ; R2=Word count gpllop mov *r0+,*r1+ ; copy the data above into r7 onwards... dec r2 ; copied all of it? jne gpllop ; loop if not mov *r11,@gr4 ; put PUTSTK address into R4 of GPL WS mov *r14+,@gr6 ; put GPL routine address in r6 of GPL WS mov r9,@xtab27 ; put XMLRTN address into >200e lwpi gplws ; load GPL workspace bl *r4 ; save current GROM address on stack mov @gxmlad,@>8302(r4) ; push GPL XML address on stack for GPL return inct @stkpnt ; adjsut the stack pointer b @ldgadd ; execute our GPL routine xmlrtn mov @getstk,r4 ; get GETSTK pointer bl *r4 ; restore GROM address off the stack lwpi glnkws ; load our ws rtwp ; all done - return to caller ;]
-
Dynamic. Radix 100. Overall size: 64 bits Power: 8 bits 14 significant digits What he said. Radix 100 is pretty decent, and easier to implement than the IEEE 754 system most modern processors use. Adamantyr Agreed. I quite like it - although the way -tive values are represented are a pain in the ass (only the first two bytes inverted, the rest not) Mark
-
Does anybody know how many digits there are in front of and behind the decimal point in a TI FP number? Or, is it dynamic (i.e. "floating point" ) Thanks
-
This sounds great! If there is room/bits spare it would be nice if it could detect coincidence between an "on" sprite pixel and an "on" tile pixel (32 column/64 column) of an on pixel in bitmap mode...?
-
That feature has been in the debugger for a very long time! Press the ? button in the debugger! Lot's of nice features explained in there!
-
Yes. I could! <swoon>! And Forth 'assembly' (because that is what it would be) is no more difficult than any other assembly language. It's much simpler than desktop Forth systems; it's just a few instructions like DROP DUP SWAP + - etc. They don't usually have an IF ELSE THEN for example, they have a simple test and jump/don't jump, like any other processor. E.g. 2 3 + (add 2 and 3 - result on the stack) 5 = ( is the value on the stack equal to 5?) JIF xx (jump if false to label xx otherwise continue) Anyway... I digress... Is there a list of the F18A features that go over and above the standard 9918 chip? Mark
-
Matthew, did you ever think about doing a 9900 or 9995? I'd like something like a 9995 (which is a sanitised version of the 9900 with pipe-lining and the read before write crap removed) with some 32 bit instructions. E.g MOV.L ADD.L. etc etc... 32 bit loads, shifts etc. That would be nice!
