Author Topic: Game design with regards to resolution  (Read 1718 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Game design with regards to resolution
« Reply #30 on: December 14, 2015, 03:28:33 AM »
Aladar: Let me know if someone didn't get this for you yet.

Necromancer

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 21366
Re: Game design with regards to resolution
« Reply #31 on: December 14, 2015, 05:49:56 AM »
Y'all make me feel so stupid, not that that's particularly difficult.  :mrgreen:

As far as whether or not a narrower screen would be acceptable in exchange for something fancy, I think it's fine and dandy.  If it looks and plays good, who cares about a little bit of black border?
U.S. Collection: 97% complete    155/159 titles

Gredler

  • Guest
Re: Game design with regards to resolution
« Reply #32 on: December 14, 2015, 09:59:06 AM »
Thanks for this discussion on the public forum for us to pour over and try to understand, what gloriously informative reading for a technically inept person such as myself. I hope to glean at least a small tidbit of insight from this, and love reading it. Thanks guys please keep it up, and hopefully someday I can repay the favor.

Punch

  • Hero Member
  • *****
  • Posts: 3278
Re: Game design with regards to resolution
« Reply #33 on: December 14, 2015, 03:22:12 PM »
Where are those secret docs that everyone refers to anyway?

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Game design with regards to resolution
« Reply #34 on: December 15, 2015, 02:24:45 AM »
Where are those secret docs that everyone refers to anyway?
Super secret docs! ;>_> If you're interested in finding them, one could always PM one of us.


Gredler: Sometimes some of this stuff seems daunting, but more exposure to it and working with it - and it becomes easier to understand.

Quote
As far as whether or not a narrower screen would be acceptable in exchange for something fancy, I think it's fine and dandy.  If it looks and plays good, who cares about a little bit of black border?
Apparently a little black border doesn't concern the Amiga scene either (a lot of the popular eye candy games run with the nearly the same ratio screen/border that I proposed. Res is different be ratio is about the same).
 

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Game design with regards to resolution
« Reply #35 on: December 15, 2015, 11:40:10 AM »
Apparently a little black border doesn't concern the Amiga scene either...

Anything as long as they didn't have giant logos and crud filling up giant borders along with Atari-ST colours.

Punch

  • Hero Member
  • *****
  • Posts: 3278
Re: Game design with regards to resolution
« Reply #36 on: December 15, 2015, 01:55:24 PM »
Thanks, bonknuts, I can ser why they aren't public now.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Game design with regards to resolution
« Reply #37 on: December 17, 2015, 06:22:19 AM »
The semester has officially ended and I'm going to do some quick tests today. Mostly the cycle count for TSB/TRB and the vDMA speed test.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Game design with regards to resolution
« Reply #38 on: December 17, 2015, 08:09:46 AM »
Ok, I have some surprising result.

First, the method.

A test loop of..
Code: [Select]
loop:
; put something here
inc counter
bne loop
That's an 11 cycle overhead for the loop. I wait until active display (a flag set during h-int), then I set the timer for two intervals (2048 cycles). On Timer interrupt, I read "counter" value and store it. Once the loop is over with, I show the counter value on screen. It's simple. It's not exact because of instruction cycle jitter to the interrupt and it might miss +1 to the counter. But it's close enough for now.

 Here are the tests:
 TRB $0002 = 103
 TRB $0003 = 77
 TSB $0002 = 103
 TSB $0003 = 77
 STA $0002 = 121
 STA $0003 = 121
 ST0 #00 = 128
 ST1 #00 = 128
 ST2 #00 = 128
 
 Keep in mind that the counter starts with 1, not zero.

 For STA's: (2048/121) - 11 = 5.925 cycles. Pretty close to the 6 cycles expected.
 For STx's: (2048/128) - 11 = 5 cycles on the dot! Heh.
 TSB/TRB for $0002: (2048/103) - 11 = 8.883 cycles. Close to the 9 that I was expecting.
 TSB/TRB for $0003: (2048/77) - 11 = 15.597 cycles! I was NOT expecting that.


The TRB/TSB at 8.883 is a little bit suspicious. It would have expected the fraction part to be larger. It's possible that the base is 8 cycles (7+1), but that the VDC is using /RDY which is in master clock delays (not master_clock/3). I ran this test in mednafen and it comes out as 7.96 cycles. Speaking of mednafen, and I don't remember which version I'm testing with off hand, but it appears to be running STx opcodes at 4 cycles instead of 5 (4+1). Given the granularity of this test, I would have expected 4.9 something for these STx opcodes. So it's possible that it's really (4+1)+fraction stall by the VDC.

 But the biggest shocker is TRB/TSB on $0003. Wow. That's 6.714 cycles slower than I expected. I'm guess that the instruction is hitting the saturation point of the VDC's open access slots. Because it's reading from vram, modifying, and writing back. The RMW part is near the end of the instruction, so it's going to be fast. The odd fractional value is probably because of alignment to the 8 dot clock of [CPU BAT CPU ??? CPU CG0 CPU CG1]. I should probably test this during vblank to see if it's faster.

 Update #2:

 I did another two test:

lda $0002; sta $0002
and
lda $0003; sta $0003

 The read/store of $0002 is 12.01 cycles for the pair. It should be something like 11.9xx, so there seems to be a fractional delay. But read/store of $0003 is exactly the same as TxB of $0003 = 15.597. It's exact. So there's definitely some sort of delay in the immediate switching of reading vram to writing vram on the VDC side.


 Update #3:
 LDA $0003; AND #12; ORA #34; STA $0003

 A total of 15.947 cycles for those four instructions. That's pretty much right on the money.
« Last Edit: December 17, 2015, 08:35:29 AM by Bonknuts »