Display kernel for 5 Card stud Poker

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Al_Nafuur

#30
with an early HMOVE I can get rid of the HMOVE bars, but I can't get anything else than an 8 pixel move to the left..


Do I need a RESPx for an early HMOVE?
        bpl lvscan1            ; repeat next scanline until finished
        sta WSYNC

        iny ; +1 1
        sty GRP0 ; +3 4
        sty GRP1 ; +3 7

        inc row_counter ; +5 12
        lda row_counter ; +3 15
        cmp #5                  ; +2 17 a = row_counter
        bpl endOfplayers ; +2 19
lda #%01000000 ; +2 21
sta HMP0 ; +3 24
sta HMP1 ; +3 27
SLEEP 43
sta HMOVE ; +3 30 ( +43 = 73
sta WSYNC

        jmp draw_a_row

alex_79

Quote from: Al_Nafuur on 23 Feb 2024, 03:52 AMDo I need a RESPx for an early HMOVE?
No, but you need different values in HMxx registers compared to normal HMOVE.
With an early HMOVE you can only move to the left, from 0 to 15 pixels.

      |HMxx values
HMOVE |8   9   a   b   c   d   e   f   0   1   2   3   4   5   6   7
Cycle |
      --------------------------------------------------------------
73    |0  -1  -2  -3  -4  -5  -6  -7  -8  -9 -10 -11 -12 -13 -14 -15
74    |0  -1  -2  -3  -4  -5  -6  -7  -8  -9 -10 -11 -12 -13 -14 -15
75    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
76    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
01    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
02    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
03    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7

If you used value $40 for normal HMOVE, you need to use $c0 for early HMOVE to get the same movement (4 pixels to the left)

Al_Nafuur

Quote from: alex_79 on 23 Feb 2024, 06:47 AM
Quote from: Al_Nafuur on 23 Feb 2024, 03:52 AMDo I need a RESPx for an early HMOVE?
No, but you need different values in HMxx registers compared to normal HMOVE.
With an early HMOVE you can only move to the left, from 0 to 15 pixels.

      |HMxx values
HMOVE |8   9   a   b   c   d   e   f   0   1   2   3   4   5   6   7
Cycle |
      --------------------------------------------------------------
73    |0  -1  -2  -3  -4  -5  -6  -7  -8  -9 -10 -11 -12 -13 -14 -15
74    |0  -1  -2  -3  -4  -5  -6  -7  -8  -9 -10 -11 -12 -13 -14 -15
75    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
76    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
01    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
02    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7
03    |8   7   6   5   4   3   2   1   0  -1  -2  -3  -4  -5  -6  -7

If you used value $40 for normal HMOVE, you need to use $c0 for early HMOVE to get the same movement (4 pixels to the left)

Thanks @alex_79 that worked!

The space between the player mirrors is ~8 cpu cycles which is enough for the two sta/x to change COLUPx and GRPx. But because of the HOMVE the "combined" space for all 5 cards is only ~3 cycles.

No matter how I time the changes it is either too early for the first row or too late for the last, so I have artefacts of color or graphic from the previous/next player.



this is the closest I can get with an overlap of the last pixel:


I thought of using VDELPx to time the changes, but since we need to change color and graphics of a player we still would need two writes (6 cpu cycles).

My solution would be to use two loops, one for the first 2-3 rows and one for the last 3-2 rows, or does anyone has a better solution?



Al_Nafuur

 >:(
It has to be moved only one TIA cycle, but one CPU cycle is 3 TIA cycles.

Wasn't there a demo for a smooth horizontal PF scrolling, where the alignment of the TIA and the CPU was changed?
 

JetSetIlly

Quote from: Al_Nafuur on 25 Feb 2024, 05:22 AM>:(
It has to be moved only one TIA cycle, but one CPU cycle is 3 TIA cycles.

Wasn't there a demo for a smooth horizontal PF scrolling, where the alignment of the TIA and the CPU was changed?
 

I think you might be talking about this. It involves RSYNC https://forums.atariage.com/topic/224946-smooth-scrolling-playfield-i-think-ive-done-it/?do=findComment&comment=2988451
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Al_Nafuur


Andrew Davie


Andrew Davie

I wonder if you had the top PF pixels of each card (just one scanline) blank.  Keep the rightmost PF pixel of the card underneath. Would this look terrible?  Or, more difficult, change PF colour for the top pixels (but not the card underneath). This would require four well-timed colupf writes.  I'm just wondering if this separator would work visually to make it nicer.

Andrew Davie

I'd also see how shifting the card ident to the rightmost corner would look, rather than centered.

Al_Nafuur

Quote from: JetSetIlly on 25 Feb 2024, 08:03 AM
Quote from: Al_Nafuur on 25 Feb 2024, 05:22 AM>:(
It has to be moved only one TIA cycle, but one CPU cycle is 3 TIA cycles.

Wasn't there a demo for a smooth horizontal PF scrolling, where the alignment of the TIA and the CPU was changed?
 

I think you might be talking about this. It involves RSYNC https://forums.atariage.com/topic/224946-smooth-scrolling-playfield-i-think-ive-done-it/?do=findComment&comment=2988451


Yes that was the demo/thread I was thinking about.

But now that I've skimmed through it again, it seems it's about moving the whole screen a few pixels and not playfield and players relatively to each others.

Al_Nafuur

Quote from: Andrew Davie on 25 Feb 2024, 09:15 AMI'd also see how shifting the card ident to the rightmost corner would look, rather than centered.

I thought of using a mirrored playfield (also mirrored horizontal), so we would have a "round" free space in the middle for the pot.

But the early HMOVE I am using here works only for moving to the left.

Al_Nafuur

I wanted to post the current (messy) state of the code, but it is breaking the 20000 char limit of the forum!

Al_Nafuur

A fast hack how the double mirrored playfield would look like:


Andrew Davie

#43
I had a think about alternates.  Here's one idea. Obviously the horizontal spacing can be changed fairly significantly here. There's a darker line top of each card to make it more distinct. The card fonts have space for 8 pixels - but here I've only used 6 max (for "10"). The numbers/suit are 6 lines deep, but I just realised I got the spades wrong (7).  Still, just a concept drawing so maybe this might give some ideas.

This mockup is drawn on a 160 x 192 image, and PF pixels are aligned properly.

poker.png

alex_79

Quote from: Al_Nafuur on 25 Feb 2024, 09:35 AMI wanted to post the current (messy) state of the code, but it is breaking the 20000 char limit of the forum!
You can attach the source file (or any other file) to the post, altough the option doesn't show up in the "quick reply" editor at the bottom of the page. Click the "preview" button, and the editor that shows up in the new page has the option to select or drag and drop files. Took a while for me to figure that out...


preview.png