English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

Thread Tools
Old 28 December 2019, 19:35   #1
This cat is no more
jotd's Avatar
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,713
noob copper question

I'm considering emulating an old 8-bit machine (Oric) display using the same technique used in the past:

- 1 bitplane (2 colors: background and foreground)

- dynamic color switching

For that I need to be able to change one (possibly 2) colors in a time for horizontal beam to draw 6 pixels maximum. Is that possible / reliable? or just too short?
jotd is offline  
Old 28 December 2019, 20:18   #2
Registered User
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 224
Too short. The copper can perform 1 operation per 8 lores pixels under ideal conditions. You will need to rely on some other method. For example, perhaps you can draw the color pattern into bitplanes, but perform 1x -> 8x stretch vertically for the color bitplanes by manipulating bpl ptrs or bpl modulos at the start of every line.
Kalms is offline  
Old 28 December 2019, 21:16   #3
This cat is no more
jotd's Avatar
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,713
the Oric was able to do that ... okay. Thanks...

Wait! when I want to change the background or foreground, I have to write a byte, but if I want to change background THEN foreground, it's okay. There's a 6 pixel gap between each operation. But the result (foreground) is expected 12 pixels later:

<background attribute> <foreground attribute> <pattern>
0 6 12

I don't really care if the foreground attribute changes at pixel 10 as long as it changes at pixel 12... Same goes if I want to change other attributes afterwards. There's always a 6-pixel "deadzone". If I eliminate attribute changes that aren't useful (ex: 2 consecutive foreground switches) that may be okay.

Last edited by jotd; 28 December 2019 at 21:22.
jotd is offline  
Old 29 December 2019, 12:18   #4
Registered User

Join Date: Jul 2015
Location: The Netherlands
Posts: 1,733
You might be able to trick something using a race-the-beam setup and using more bitplanes to 'buffer' colours. However, if that works (I've not calculated it yet in detail, but my gut tells me it is doable for at least reasonably wide screens with a one change per six pixels restriction) it would take a lot of DMA bandwidth. So much so that it may only be useful for stills.

It'd be fiddly too as you'd basically be setting the shown colours of all pixels on screen using the Copper.
roondar is offline  
Old 10 January 2020, 15:37   #5

Photon's Avatar
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,818
Originally Posted by jotd View Post
the Oric was able to do that ... okay. Thanks...
Emulating hardware chips with software will always be slower.

No chance for a realtime emu on OCS. AGA should be able to set 40x2 colors per line, first char using COLOR01 and 02, second COLOR03 and COLOR04 etc. Track color and character changes and only update those, if scrolling do a hardware scroll with bitplane pointers in a rolling buffer. The same could be done on OCS but instead of generating a Copper you generate a bitmap. Only use the CPU then, it will run at almost 100% speed. It will still be ~1000 chars to draw, so best case only ~10 FPS.

This should make most if not all programs and games run. If a few demos rely on timing tricks, and you expect to solve that, well consider that some GHz emus don't. So don't feel bad
Photon is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
noob question regarding bootblocks Akira Coders. Asm / Hardware 13 27 March 2013 22:10
Noob question, sorry. fitzsteve project.WHDLoad 3 23 August 2009 16:56
Noob Question but anyway. trackah123 Coders. General 17 30 October 2008 14:39
yet another noob question AliasXZ New to Emulation or Amiga scene 11 23 January 2008 23:28
Sorry bout this noob question jobro Coders. General 18 05 December 2005 04:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 22:10.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.06536 seconds with 13 queries