VGA ISA on ST

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

VGA ISA on ST

Postby artik-wroc » Wed Jun 13, 2018 3:29 pm

VAR Reg : BYTE;
BEGIN
Reg := Port[$3CC];
Reg := Reg OR 1;
Port[$3C2] := Reg;
END

VGA graphics card mono/color emulation on PC. And what will be the equivalent for Atari, if I know that:
Membase: $FEC0.0000
I/O Base: $FED0.0000
ET4000

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Wed Jun 13, 2018 4:25 pm

As you already wrote yourself, the IO ports will appear in the address space at a certain offset, $FED0.0000 in your case. So for example IO port $3CC would be at $FED0.03CC -- and $D0.03CC as well in case of an ST because the upper 8 address bits do not matter there. However, note that many 68000 <-> ISA adapters (such as the Nova) will not allow you to read odd numbered IO ports unless you have previously switched the ET4000 into 16 bit IO mode.

EmuTOS has support for ET4000 built in, you can see there how I access the ET4000: https://github.com/emutos/emutos/blob/m ... ios/nova.c
Last edited by czietz on Sat Jun 16, 2018 5:41 pm, edited 1 time in total.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1562
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: VGA ISA on ST

Postby frank.lukas » Wed Jun 13, 2018 6:38 pm

VOFA, Multiboard and Panther, Panther/2 Adapter has 8-bit IO mode at the ET4000. Nova has 16-bit
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Sat Jun 16, 2018 5:04 pm

How can you bypass the VGA BIOS interrupt call (INT10H) from the Atari level? I'm too weak :(

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Sat Jun 16, 2018 5:40 pm

artik-wroc wrote:How can you bypass the VGA BIOS interrupt call (INT10H) from the Atari level? I'm too weak :(


By doing all the hard stuff yourself: Program all the ET4000 registers like the VGA BIOS would do. The ET4000 data book is required: https://archive.org/details/bitsavers_t ... 0_11230195

ctirad
Captain Atari
Captain Atari
Posts: 243
Joined: Sun Jul 15, 2012 9:44 pm

Re: VGA ISA on ST

Postby ctirad » Sun Jun 17, 2018 1:57 pm

Cziets, you are awesome. I have to check it on my Mulltiboard and Panther2.
Is there a way to enable some debug info? I'm going to start emutos from the floppy (image).

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Sun Jun 17, 2018 4:47 pm

ctirad wrote:Cziets, you are awesome. I have to check it on my Mulltiboard and Panther2.
Is there a way to enable some debug info? I'm going to start emutos from the floppy (image).


You can uncomment the line...

Code: Select all

/* #define ENABLE_KDEBUG */
...to get some basic debug output. As usual with EmuTOS, you also have to change the include/config.h file to define where you want the debug output to be. I normally enable RS232_DEBUG_PRINT to get the output on the serial port.

To use a different adapter, you might have to modify detect_nova() to check the respective addresses.

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Tue Jun 19, 2018 5:51 pm

Registers on the ISA side are one thing, but what about Atari (VDI)?
Do you know VGA drivers (sources) on Atari? I found only STGA.

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Tue Jun 19, 2018 6:02 pm

Maybe it's easier to answer your questions if you tell more about what you're trying to accomplish. Writing a VDI for ET4000?

User avatar
Cyprian
Atari God
Atari God
Posts: 1479
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: VGA ISA on ST

Postby Cyprian » Tue Jun 19, 2018 6:15 pm

artik-wroc wrote:Registers on the ISA side are one thing, but what about Atari (VDI)?
Do you know VGA drivers (sources) on Atari? I found only STGA.


ask Idek. If I'm not wrong, he should have all needed sources: https://silicon-heaven.org/atari/nova/
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Tue Jun 19, 2018 6:25 pm

Running the card in the standard VGA (12h) 640x480x16col mode.
There are sources of drivers in C (without the use of DOS program interrupt). Registry programming. Even using PEEK and POKE in GFA, you can read and change them, but this is not enough.
I don't have experience in this topic :)

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Tue Jun 19, 2018 7:04 pm

Yes, but what you want to do with it when it's in VGA mode 12h? Just run your own code, for example a port of a DOS game or demo? Then you don't need a VDI driver; just access the VGA video memory directly.

If you want to run arbitrary TOS and GEM applications, then you need a VDI driver, of course, like the Nova VDI that Cyprian provided a link to. However, in that case VGA mode 12h is a reasonably bad choice, in terms of performance, because setting a single pixel requires four read and four write accesses to video memory -- or constant tinkering with VGA registers.

PS: You mention that the source code of STGA's VDI is available. Where?

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Wed Jun 20, 2018 5:40 am

It's the equivalent of the Standard VGA driver, known in Windows.
Why this mode? Because this is a sensible resolution (320x200 ? No).
The standard VGA modes are on almost every ISA card, including those for which there are no drivers eg. Trident.
http://www.harbaum.org/till/atari/index.html (STGA_SW)

User avatar
Cyprian
Atari God
Atari God
Posts: 1479
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: VGA ISA on ST

Postby Cyprian » Wed Jun 20, 2018 8:45 am

artik-wroc wrote:It's the equivalent of the Standard VGA driver, known in Windows.
Why this mode? Because this is a sensible resolution (320x200 ? No).
The standard VGA modes are on almost every ISA card, including those for which there are no drivers eg. Trident.
http://www.harbaum.org/till/atari/index.html (STGA_SW)



Stupid question, what is the difference between Idek's drivers and STGA drivers? Both have VDI drivers for ET4000.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Wed Jun 20, 2018 11:41 am

Maybe only addresses (MEM, I/O) for specific ISA adapters (would it be enough to reprogram GAL?). I don't know.

czietz
Hardware Guru
Hardware Guru
Posts: 689
Joined: Tue May 24, 2016 6:47 pm

Re: VGA ISA on ST

Postby czietz » Wed Jun 20, 2018 4:41 pm

Cyprian wrote:Stupid question, what is the difference between Idek's drivers and STGA drivers? Both have VDI drivers for ET4000.


Well, they are different implementations of a similar thing -- NVDI/ET4000 would be yet another VDI driver for ET4000. Idek has drivers for different adapters, i.e. different base addresses: MEGA4000, Volksfarben and Nova; while the STGA driver is of course meant for STGA only.

BTW: Where on Till's page do you see the source code to the VDI? STGA_SW (where SW = schwarz-weiß = black & white) is just a simple configuration program for a monochrome mode that mostly uses TOS's VDI. That's comparable to what I added to EmuTOS; it's not a fully-fledged VDI driver for the ET4000. In particular, it won't help you implementing anything using color modes.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1562
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: VGA ISA on ST

Postby frank.lukas » Wed Jun 20, 2018 5:01 pm

There are also Nova Driver for Till´s STGA Adapter ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

artik-wroc
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 129
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: VGA ISA on ST

Postby artik-wroc » Wed Jun 20, 2018 6:07 pm

czietz wrote: Where on Till's page do you see the source code to the VDI?

Where did I write something like that?
These are the only sources I have found in this topic (anything). You added EmuTOS, that's all.
Rather, there is no book "Programming VGA cards from Atari level".

User avatar
Cyprian
Atari God
Atari God
Posts: 1479
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: VGA ISA on ST

Postby Cyprian » Wed Jun 20, 2018 6:48 pm

czietz wrote:
Cyprian wrote:Stupid question, what is the difference between Idek's drivers and STGA drivers? Both have VDI drivers for ET4000.


Well, they are different implementations of a similar thing -- NVDI/ET4000 would be yet another VDI driver for ET4000. Idek has drivers for different adapters, i.e. different base addresses: MEGA4000, Volksfarben and Nova; while the STGA driver is of course meant for STGA only.

BTW: Where on Till's page do you see the source code to the VDI? STGA_SW (where SW = schwarz-weiß = black & white) is just a simple configuration program for a monochrome mode that mostly uses TOS's VDI. That's comparable to what I added to EmuTOS; it's not a fully-fledged VDI driver for the ET4000. In particular, it won't help you implementing anything using color modes.


ok, I see that now.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 2 guests