Jump to content
IGNORED

Sophia 2 Programming


Recommended Posts

I try to do some tests with sophia 2 that is equipped in two of my XLs.

 

First of all I tried to change the color of the font in gr.0, background black, font red.

 

Poke 709,52
Poke 710,0

 

This works as long as I activate 2 color hi-res in the config menu of my U1MB.

 

But what do I have to do if this mode isn't activated, e.g. when I have an ATARI without U1MB?

 

Poke 53277, 128+16

 

doesn't work. Or do I have to set COLPF1 in a vbi or dli?

Edit: Got it, Poke 53277,128+16+8 did the trick.

 

So the final question remains: @Synthpopalooza  mentioned that is possible to get a resolution of 160x182x45 colours. How?

 

Edited by patjomki
Link to comment
Share on other sites

There's a program you can load from Dos (SCONF.XEX) to set Sophia config such as output mode to the monitor, bit0 colour register enable, independent PF1 text colour etc.

 

There's also a PDF (SOPHIA2_en_1_2.PDF) manual for Sophia that describes the available registers so you can alter settings inside your own program.

Best to source these from the thread where they're posted (I don't have a link)

  • Like 1
Link to comment
Share on other sites

11 hours ago, patjomki said:

I try to do some tests with sophia 2 that is equipped in two of my XLs.

 

First of all I tried to change the color of the font in gr.0, background black, font red.

 


Poke 709,52
Poke 710,0

 

This works as long as I activate 2 color hi-res in the config menu of my U1MB.

 

But what do I have to do if this mode isn't activated, e.g. when I have an ATARI without U1MB?

 


Poke 53277, 128+16

 

doesn't work. Or do I have to set COLPF1 in a vbi or dli?

Edit: Got it, Poke 53277,128+16+8 did the trick.

 

So the final question remains: @Synthpopalooza  mentioned that is possible to get a resolution of 160x182x45 colours. How?

 

There is a flag which toggles the Graphics 10 1/2 pixel shift on and off.  If you toggle this every VBI or every scanline, a HIP mode flicker type effect is created amongst the 9 colors.  There are 45 possible color combinations this way, using a simulated 160 pixel resolution like HIP mode.

Edited by Synthpopalooza
Link to comment
Share on other sites

In addition there's this:

 

 

By selecting ANTIC 4/5 and GTIA 10, and then plotting color pattern %1000, instead of a standard graphics 10 pixel, a pixel which is 1/2 PM1 and 1/2 PF2 is created.  This is an artifact of disabling the Graphics 10 pixel shift.  I had wondered if a HAM style mode could be created using this method, by stuffing the PM1 and PF2 registers repeatedly on a scanline.

 

The same effect is had with ANTIC 6/7 (aka Graphics 1 and 2) with GTIA 10 enabled.

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

I also forgot to mention - the OS becomes an obstacle in effectively using the bit0 palette setting because it ANDs the shadow colour registers before storing them, wiping out the lowest bit.

So to properly utilize it you'd need either a custom VBlank routine or a DLI to set the colours for you.

Link to comment
Share on other sites

The idea here was to use a VBI routine on top of a DLI to swap the PMCTL register on Sophia, and 6 different character set registers every vblank.  When I run it on Altirra it shows the interlaced parrot at 45 colors, albeit only in the standard 80 pixel GTIA resolution.  In sophia, it's supposed to shift the second frame right by 1/2 pixel every odd vblank.  As I don't have a sophia, I kinda coded this blind, and have no idea if I am doing anything wrong with the PMCTL register.

 

1140 DPOKE 1024,756:DPOKE 1026,$D01D:D
POKE 1028,1718
1150 REM Set the registers used by the
routine
1160 REM 1034 up are not used so get D
POKEd to 65535
1170 DPOKE 1030,1713:DPOKE 1032,1714:D
POKE 1034,1715:DPOKE 1036,1716:DPOKE 1
038,1717
1180 REM set values for character and
color registers
1181 POKE 1042,128:POKE 1043,192

The key lines are 1140 and 1181.  locations 1024 up to 1038 contain the register locations to flip, and 1040 up, are the two values each register gets.  For PMCTL (shifted at 1026), it's 128 and 192 to swap out the Graphics 10 shift flag.  Evidently something I am doing is making it barf ...

Link to comment
Share on other sites

20 hours ago, Synthpopalooza said:

The key lines are 1140 and 1181.  locations 1024 up to 1038 contain the register locations to flip, and 1040 up, are the two values each register gets.  For PMCTL (shifted at 1026), it's 128 and 192 to swap out the Graphics 10 shift flag.  Evidently something I am doing is making it barf ...

 

Took me a while to get that PMCTL meant GRACTL ($D01D) ? but actually even though I figured it out I don't understand what is going on in your program. Perhaps the behaviour of your program has something to do with the fact that I am in PAL land?

Link to comment
Share on other sites

3 hours ago, Synthpopalooza said:

it may.  Basically $D01D controls the Sophia.  Bits 7 and 6 turn off the Graphics 10 shift, and 7th bit only,  turns it off.  There is a VBI in the program which shifts it 60 times a second, in theory it should make a 160 pixel pseudo mode like HIP.

Ok. 60 times a second reads like NTSC. Perhaps for testing purposes you can change your vbi to 50 times a second instead?

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...