Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 June, 2013, 13:39:24 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Stripes instead of flickerless -  (Read 612 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 22:11:33
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2943


Topic starter
Total Post Ratings: +432

View Profile
« on: 28 August, 2011, 23:58:57 »
0

In my topic on the game "Elimination," I mentioned that my grayscale was "almost" flickerless.  However, no matter what I attempt (fixed timings for the LCD delay, never using di, etc.)  I see wierd gray stripes starting from the bottom and working their way to the top, like a barbership pole.  Any ideas as to why?  (Note: when you select this program from applications, press 2nd even if nothing appears.  Also, YOU WILL NEED TO START YOUR CALCULATOR FRESH when using this program, as entrances and exits are unstable.)

EDIT: Here's the interrupt routine I'm using.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

relocate($F6F6)
F:

di


_
push af
push de
push bc
push hl

ld a, (frameage)
inc a
ld (frameage),a
cp 1
jr z, doregular
cp 3
jr z, dogray
cp 4
jr nz, EndInterrupt
xor a
ld (frameage), a
jr EndInterrupt

doregular:
ld hl, regularbuffer
call safecopy2
jr EndInterrupt

dogray:
ld hl, grayscalebuffer
call safecopy2

EndInterrupt:

pop hl
pop bc
pop de

ld a, %00001000
out (3), a
ld a, %00001010
out (3), a
pop af




ei
ret
SafeCopy:
;ld hl, plotsscreen
safecopy2:

ld c,$10
ld a,$80
setrow:
in b,(c)
rl b
jp c,setrow
out ($10),a
ld de,12
ld a,$20
col:
in b,(c)
rl b
jp c,col

out ($10),a
push af
inc c
ld b,64
row:

rowwait:
in a,($10)
rla
jp c,rowwait
ld a, (hl)
out (c), a
add hl,de
dec b
jp nz, rowwait
pop af
dec h
dec h
dec h
dec c
inc hl
inc a
cp $2c
jp nz,col

ret


* Elimination.8xk (89.75 KB - downloaded 14 times.)
« Last Edit: 29 August, 2011, 00:02:35 by Hot_Dog » Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 18 June, 2013, 05:33:45
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1490


Total Post Ratings: +778

View Profile
« Reply #1 on: 29 August, 2011, 02:13:07 »
0

I've got a feeling that the second I see the effect that is happening, I'll be able to tell what's wrong. But, at the moment, the app crashes the moment I start it in wabbitemu. The program works until I press 2nd. Pressing 2nd I believe tries to draw the screen and that is when it crashes. (I can move up or down, but the moment I press 2nd, it locks)
Logged

zStart v1.3.012 6-10-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
annoyingcalc
the annoying calculator
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 02:24:33
Date Registered: 14 April, 2011, 23:02:24
Location: In the glorious land of minecraft
Posts: 1782


Total Post Ratings: +57

View Profile WWW
« Reply #2 on: 29 August, 2011, 02:25:33 »
0

what do you do to get past the gemini screen?
Logged

Click here to see where you got your post ratings

My minecraft server is usually up, even if mcserverlist says it is down

Spoiler for siq:
Spoiler for signature:
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:30:47
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2738


Total Post Ratings: +376

View Profile
« Reply #3 on: 29 August, 2011, 03:09:00 »
0

It looks like you're trying to do grayscale like this (warning epilepsy Tongue), but usually we do grayscale like this, which blends together much better. We can't reliably synchronize with the LCD on the TI-83+, plus we usually can't update the screen quickly enough to keep up anyway.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 22:11:33
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2943


Topic starter
Total Post Ratings: +432

View Profile
« Reply #4 on: 29 August, 2011, 04:34:30 »
0

It looks like you're trying to do grayscale like this (warning epilepsy Tongue), but usually we do grayscale like this, which blends together much better. We can't reliably synchronize with the LCD on the TI-83+, plus we usually can't update the screen quickly enough to keep up anyway.

Actually the first one is how I drew grayscale.  So you're saying that grayscale blends much better if I use a checkerboard pattern?
Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #5 on: 29 August, 2011, 04:52:04 »
0

I will refrain from suggesting the Axe routine and give you a link to Thepenguin77's explanation.  

http://www.omnimaga.org/index.php?topic=6941.msg128465#msg128465

You can't really apply the crystal timers or the extra ram, but it does have a good algorithm for creating the stripe patterns.  Smiley

Oh, also use horizontal auto increment instead of vertical auto increment. 
« Last Edit: 29 August, 2011, 04:53:54 by ralphdspam » Logged

ld a, 0
ld a, a
Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 22:11:33
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2943


Topic starter
Total Post Ratings: +432

View Profile
« Reply #6 on: 29 August, 2011, 04:59:24 »
0

I guess what you're saying is it doesn't work if I have two buffers where pixels alternate in a checkboard pattern?

EDIT: Oh, it's because no matter how fast or how slow you refresh the screen RAM, it displays 60 times a second.  I missed that part.
« Last Edit: 29 August, 2011, 05:03:36 by Hot_Dog » Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #7 on: 29 August, 2011, 05:42:12 »
0

I guess what you're saying is it doesn't work if I have two buffers where pixels alternate in a checkboard pattern?
No, that should work if you time the picture properly.  

Quote
EDIT: Oh, it's because no matter how fast or how slow you refresh the screen RAM, it displays 60 times a second.  I missed that part.
Yeah.  That might be the problem.  
« Last Edit: 29 August, 2011, 05:42:34 by ralphdspam » Logged

ld a, 0
ld a, a
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:30:47
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2738


Total Post Ratings: +376

View Profile
« Reply #8 on: 29 August, 2011, 05:51:34 »
0

I guess what you're saying is it doesn't work if I have two buffers where pixels alternate in a checkboard pattern?

EDIT: Oh, it's because no matter how fast or how slow you refresh the screen RAM, it displays 60 times a second.  I missed that part.
You can keep the buffers how they are, but you should combine them in such a way that it takes 2 pixels from the dark buffer, 1 pixel from the light buffer, 2 pixels from the dark buffer, 1 pixel from the light buffer, etc. This can be done with some clever bitmasking. You'll have to do 3 screen updates before the pattern repeats itself.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 22:11:33
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2943


Topic starter
Total Post Ratings: +432

View Profile
« Reply #9 on: 29 August, 2011, 05:59:05 »
0

I guess what you're saying is it doesn't work if I have two buffers where pixels alternate in a checkboard pattern?

EDIT: Oh, it's because no matter how fast or how slow you refresh the screen RAM, it displays 60 times a second.  I missed that part.
You can keep the buffers how they are, but you should combine them in such a way that it takes 2 pixels from the dark buffer, 1 pixel from the light buffer, 2 pixels from the dark buffer, 1 pixel from the light buffer, etc. This can be done with some clever bitmasking. You'll have to do 3 screen updates before the pattern repeats itself.

I'm only doing 3-color grayscale.  I think my problem is the screen refresh.
Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:30:47
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2738


Total Post Ratings: +376

View Profile
« Reply #10 on: 29 August, 2011, 06:05:08 »
0

I guess what you're saying is it doesn't work if I have two buffers where pixels alternate in a checkboard pattern?

EDIT: Oh, it's because no matter how fast or how slow you refresh the screen RAM, it displays 60 times a second.  I missed that part.
You can keep the buffers how they are, but you should combine them in such a way that it takes 2 pixels from the dark buffer, 1 pixel from the light buffer, 2 pixels from the dark buffer, 1 pixel from the light buffer, etc. This can be done with some clever bitmasking. You'll have to do 3 screen updates before the pattern repeats itself.

I'm only doing 3-color grayscale.  I think my problem is the screen refresh.
Oh I see, I misread your code. You can still do something similar with 3-level, by taking alternating pixels from each buffer (which makes good use of the lcd output delay). Either that or you can draw the buffers in a checkerboard pattern to begin with, but that might hurt performance.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 22:11:33
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2943


Topic starter
Total Post Ratings: +432

View Profile
« Reply #11 on: 30 August, 2011, 04:04:27 »
0

Thanks to everyone for helping me get this to work.  Now I just need to write a calibration routine Smiley
Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.299 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.