Jump to content
IGNORED

SIDE3 - problems with SIC! cart images and timer icon glitch


madness77

Recommended Posts

Hi,

At the beginning I wanted to say that SIDE3 is a great piece of hardware that I have been waiting for a long time for.

Many thanks to @candle and @flashjazzcat for a great job! Of course also to the @lotharek for the great production quality. :)

 

However, while browsing through the collection of my different types of files (ATRs, CARs, ROMs...), I came across a problem: 

 

512kB images for the SIC! catridge are not supported correctly:

 

- SIC31IN1.ROM - some games start, trying to start others ends with SELFTEST.

 

- The Best....car - mounting the image ends with the screen flashing.

 

There is no problem with that files in the other cartridge (Ultimate).

 

I attach both files.

SIC31in1.rom The Best Polish ATARI Games.car

  • Thanks 1
Link to comment
Share on other sites

For the sake of clarity: the Sic! issue is the one I was already aware of, but the timer issue cannot be reproduced here. I am therefore very interested to know if anyone else experiences it.

 

As for the Sic! issue: while the problem is known to me, the solution is not. ;)

 

Three other issues people may have run into were already fixed today:

  • Problems launching ATRs
  • Inability to boot on-board SDX via CTRL+X in the loader
  • Screen glitch when enabling/disabling stand-alone ATR support in the loader's settings menu

I am currently testing the loader flashing tool and attempting to ensure it works reliably on machines other than my own, meanwhile, otherwise I won't be able to issue any updates at all. :)

 

  • Like 4
Link to comment
Share on other sites

8 hours ago, snicklin said:

Not seen the timer issue but it looks like an out by 1 error.

Well yes: the index into the bitmap would have to be off by one, or the data would have to be shifted one position in RAM. Difficult to see how the former could happen:

	inc TimerState
	lda TimerState
	and #$1F
	sta TimerState
	
@
	and #$1C		; strip lower two bits of timer
	asl @
	adc #7	; we know C = 0
	tax
	ldy #7
@
	lda TimerData,x
	sta Font1Data+[27*$08],y
	dex
	dey
	bpl @-

 

  • Like 1
Link to comment
Share on other sites

 

3 hours ago, flashjazzcat said:

@

  and #$1C ; strip lower two bits of timer

  asl @

  adc #7 ; we know C = 0

  tax

  ldy #7

@

  lda TimerData,x

FJC, in your code above, is the asl an asl A, or is it operating on one of the instructions at the label @?  Typo/bug?

 

It looks to me like you are trying to double A, and then set the bottom 3 bits, in which case you can optimize it a little by removing the AND and changing the ADC #7 to an ORA #7.  This saves 2 bytes & 2 cycles.

So,

@

  ASL A

  ORA #$07

  TAX

  LDY #$07

@

  LDA TimerData,X

 

  • Like 2
Link to comment
Share on other sites

8 minutes ago, StickJock said:

FJC, in your code above, is the asl an asl A, or is it operating on one of the instructions at the label @?  Typo/bug?

That's just a cosmetic convention denoting implied addressing in some assemblers. I generally try to train myself out of it, but sometimes it happens. It does no harm. :)

9 minutes ago, StickJock said:

It looks to me like you are trying to double A, and then set the bottom 3 bits, in which case you can optimize it a little by removing the AND and changing the ADC #7 to an ORA #7.

Very true. I have no idea why I didn't do that already since it's rather obvious now that you point it out. Certainly it's true that no code ever posted on the Internet will not immediately be subject to optimisation unless it's more than a few dozen lines long. :D

 

Thanks!

  • Like 1
Link to comment
Share on other sites

1 minute ago, flashjazzcat said:

I guarantee I would have been glad of those two free bytes in the past in the U1MB Loader before I recovered them from elsewhere. :)

I feel your pain.  I spent over a decade of my career working on a micro that only had 2K of OTP ROM and 128 words of RAM.  It did have a nice instruction set, though.

 

Link to comment
Share on other sites

1 minute ago, StickJock said:

I spent over a decade of my career working on a micro that only had 2K of OTP ROM and 128 words of RAM. 

Nice! It's fun, though... at least when you suddenly spot something which can be optimised (not so much when you can't). Amazing how a different pair of eyes can spot missed opportunities too. The loader was already bursting the banks of 16K when I had to make the XEL version with support for dual physical disks and such. It's weird that every time one needs more space, one is somehow able to find it. Not indefinitely, of course, but the limit has evidently not been reached. :)

 

With SIDE3, I'm not quite so bothered since the loader doesn't have to fit on the U1MB and I have more or less unlimited ROM space. The VBI code isn't especially performance-critical but there are certainly plenty of areas which are (such as cataloguing FAT directories), which is where I focused my attention when optimising.

Link to comment
Share on other sites

4 minutes ago, flashjazzcat said:

Amazing how a different pair of eyes can spot missed opportunities too.

We called that "Eyeball Pressure".  It makes the bugs & optimizations pop out!  Some people thought code reviews were drudgery, but I always enjoyed them.  It was a fun challenge to spot bugs & find optimizations.

 

 

Link to comment
Share on other sites

Some people can write "code", but writing code that is optimized for size/performance is a skill that I think is missing

these days, also an understanding of the platform is going to run on and its strengths/limitations, again I don't

think many developers these days consider such things. 

Link to comment
Share on other sites

"Kids these days" have virtually unlimited resources - Disk space, RAM, CPU speed, etc.  My first computer was a ZX81 with only 1K or RAM.  I wrote a lot of code on a 4K Wang 2200T at school as well before I got my 48K Atari 800 with only 90K per side on the floppy drive and limited cycles in the DLIs and VBIs.

 

Now, the down side is that for interpreted code, I skipped the comments as they took up space.  But still, it instilled a sense of coding conservatism, where every instruction mattered and arranging conditionals so that the more common case is the quickest to save cycles.  Even when I was "forced" to use higher level languages before I retired, I would look at the generated assembly and tweak my source so that the compiler would generate better/shorter/faster code.

 

I used to think of it as the difference between a computer programmer and a software engineer.  But then again, kids these days....

 

(Get off of my lawn!)

Link to comment
Share on other sites

As well as the issues I mentioned earlier in the thread, I've just fixed:

  • CTRL+H not going to the home (root) folder when pressed deep in a file list with >256 entries
  • CTRL+P and ESC not calling the parent folder when pressed deep in a file list with >256 entries

No word on the Sic! issue yet, so I may simply remove support for Sic! types entirely for now unless a fix is forthcoming before I release the update.

 

 

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...