Author Topic: InSaNiTy!  (Read 7361 times)

0 Members and 2 Guests are viewing this topic.

Insanity

  • Guest
InSaNiTy!
« Reply #15 on: April 05, 2007, 01:27:00 pm »
Ooh, I will try this just because of the coincidence of names. ^_^

Insanity

  • Guest
InSaNiTy!
« Reply #16 on: April 05, 2007, 01:32:00 pm »
Bump!
I tried it.  Bugs galore.

Offline bfr

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 819
  • Rating: +4/-0
    • View Profile
    • bfr's website
InSaNiTy!
« Reply #17 on: April 05, 2007, 02:25:00 pm »
Oh, and this version, note that you have to go to the blocks, not dodge them.  :Dbiggrin.gif

Also, do you think it is too slow?

Liazon

  • Guest
InSaNiTy!
« Reply #18 on: April 06, 2007, 05:56:00 am »
unless anybody objects to the artifacts on the screen (i mean the stuff left behind from the sprites), I might suggest a fastcopy that clears the buffer at the same time?

c1-->
CODE
ec1;--- Copy the gbuf to the screen and clear graph buffer (fast)
;Input: nothing
;Output:graph buffer is copied to the screen and subsequently cleared
fastCopy:
 di
 ld a,$80
 out ($10),a
 ld hl,gbuf-12-(-54125+(12*64)+1)
 ld a,$20
 ld c,a
 inc hl
 dec hl
fastCopyAgain:
 ld b,64
 inc c
 ld de,-(12*64)+1
 out ($10),a
 add hl,de
 ld de,11
fastCopyLoop:
 add hl,de
 inc hl
 inc de
 ld a,(hl)
 ld (hl),0

Offline bfr

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 819
  • Rating: +4/-0
    • View Profile
    • bfr's website
InSaNiTy!
« Reply #19 on: April 06, 2007, 10:15:00 am »
Excellent idea, Liazon!  Before I was using a separate routine to clear the screen, but I only did it every time a block reached the edge to make it faster, but now the screen gets to be cleared constantly to get rid of the junk left over when sprites move, AND it is faster (because I don't have to call the separate routine).  :)smile.gif

EDIT:  Liazon, are you sure that routine works?  The assembler won't assemble the "gbuf-12-(-54125+(12*64)+1)" part, but it does when I replace gbuf with plotsscreen.  But, when I do that, it seems to clear the buffer and then copy the cleared data to the screen.  o.oblink.gif  Which seems pretty pointless.  Any ideas?  I'm using Brass with Latenite, in case that helps.

Liazon

  • Guest
InSaNiTy!
« Reply #20 on: April 09, 2007, 09:50:00 am »
Should be right since I did just copy it from the wikiti article on fastcopy.

the concept is pretty simple.  replace a inc hl for ld (hl),0 so that you can load 0 into the buffer area you're readinf from AFTER you've loaded it into a and before outing it.  Since you have 1 less inc hl and the row has 12 bytes, you need to ld de,11 so you can add 11 + inc hl = +12 within the loop.

maybe you can post more of your code and we can help out?

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
InSaNiTy!
« Reply #21 on: April 10, 2007, 02:33:00 am »
Just to answer your question, I have an 89. :)smile.gif
Omnimaga Admin

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
InSaNiTy!
« Reply #22 on: April 10, 2007, 10:18:00 am »
Ok just so you know the routine Liazon posted does work no doubt about it. Possibly you are not writing to plotsscreen. So bfr go find your equate for plotsscreen and tell me what it is and then tell me the value of the buffer that you are writing to. All your routine should be writing to $9340 if you want to update plotsscreen.

Just to show proof that the routine works I have written a little sample. It writes 64 bytes to plotsscreen and then calls the routine that Liazon posted. Then it calls a getkey and after a key is pressed it calls ionfastcopy which updates plotsscreen showing that it is blank.

user posted image
There are 10 types of people in this world-- those that can read binary, and those that can't.