English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 18 March 2024, 16:24   #141
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,996
Quote:
Originally Posted by reassembler View Post
not to the point where it's ever going to be any fun on an A1200.
Stock mode. No graphics, but the audio helps you imagine there's a game under there.
Dunny is offline  
Old 18 March 2024, 19:49   #142
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
Looking forward to testing a live demo myself

Much can be said about what the right way to "swap screen" is, but my personal preference is to generally triple buffer (memory permitting). Copper interrupt at end of frame as suggested is also good, otherwise - if your copperlist is simple - you can always just add a wait instruction at the start to ensure your vblank interrupt routine is not outrun (pun intended) by copper.
paraj is offline  
Old 19 March 2024, 19:31   #143
ancalimon
Supernormal
 
ancalimon's Avatar
 
Join Date: Jul 2007
Location: Istanbul / Turkey
Age: 43
Posts: 1,411
Quote:
Originally Posted by reassembler View Post
Using WinUAE, cycle accurate - it runs on an A1200 configuration with added FastRAM. But it's too slow to be anything beyond a curiosity - although US Gold would have probably released it. I haven't tried on hardware.

I will be implementing toggles for a lot of the graphical elements in the final release, so you'll be able to compromise visual fidelity to claw back some speed - but not to the point where it's ever going to be any fun on an A1200.
The question is does it run faster than the original one?
ancalimon is offline  
Old 19 March 2024, 19:34   #144
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,165
Amazing work. I can't wait to see it finished.
Karlos is offline  
Old 22 March 2024, 17:14   #145
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
AmigoRun - Demo Version 1

Code:
------------------------------------------------------------------------------
                                 AmigoRun Demo

                                Reassembler 2024
                                
                      https://www.youtube.com/@reassembler68k
------------------------------------------------------------------------------

This is a technical demo, not a playable game, of my progress in porting the
arcade version of OutRun to the Amiga. There are a wide variety of Amiga
configurations in the wild and I’m keen to understand whether this runs on
them and how it performs.

Required Hardware:
 * 68030+ Processor
 * AGA Chipset
 * 2MB Chip RAM
 * 8MB Fast RAM

The only genuine hardware I’ve tested this on is my personal setup, which
consists of an A1200 with a TF1230 card. This adds a Motorola 68030 @ 50Mhz
with 128mb Fast RAM. It may run on 020 based hardware, but not at a usable 
speed.

------------------------------------------------------------------------------
Getting Started
------------------------------------------------------------------------------

First up, you’ll need to convert the Arcade ROMs to the format required by
the Amiga. Any version of the arcade ROMs will do. There’s a Python script
provided to perform this task.

You can download Python 3 from here: https://www.python.org/downloads/

1/ Copy the Arcade ROMs to the ‘in’ subdirectory.

2/ Ensure Python is in your system path and can be run from typing 'python' at
   the command line.

2/ Run the python script as follows from the command line:
   python amiga_rom_exporter.py

3/ The script will output the following files to the aptly named ‘out’
   subdirectory:
   - tiles.bin
   - sprites.bin
   - road1.bin
   - road2.bin

4/ Copy these files, along with the main OutRun executable, to your Amiga hard
drive. Execute from Workbench!

------------------------------------------------------------------------------
Controls
------------------------------------------------------------------------------

 * Cursor Up      Increase Speed (Keep pressing to increase speed)
 * Cursor Down    Stop
 * Cursor Left    Move Camera Left
 * Cursor Right   Move Camera Right
 * F1             Toggle Debug Display
 * F10            Quit

------------------------------------------------------------------------------
What’s Ported and Emulated So Far?
------------------------------------------------------------------------------

 * Level data for all 15 Stages
 * 30% of Main 68k Codebase
 * 100% of Sub 68k Codebase
 * Sega Tilemap Hardware (2 Layers)
 * Sega Sprite Scaling Hardware, Partial Translucent Shadows
 * Sega Road Hardware

------------------------------------------------------------------------------
Known Limitations
------------------------------------------------------------------------------

 * Stage 5 Autobahn tilemap has an incorrect palette.
 * Horizontal line between tilemaps and road layer at times. Tricky one to
   solve as it’s the result of extreme (but necessary) rendering
   optimizations.
 * Some temporary sprite palette issues if the engine wraps back to Stage 1
   from the final stage.

------------------------------------------------------------------------------
Questions
------------------------------------------------------------------------------

Q. "Will this run on my stock A500 with leaking capacitors that’s been in a
   damp loft for 30 years? It ran Lotus 2, so should easily be capable of
   running OutRun."

A. No ;)

Q. "Is this Arcade perfect so far?"

A. Almost. Sega’s custom graphics hardware is substantially more powerful than
   AGA. As a result some, hopefully small, compromises have been made.
   If you don’t believe me, see: https://segaretro.org/Sega_OutRun_hardware
   
   I have also fixed a couple of bugs present in the original codebase, so
   there are improvements too.

Q. "Can’t you just cull scenery / remove shadows / remove stuff to make things
   faster?"

A. Yes. That’s an easy option I’d hope to include in the final release. But
   right now I’m focused on just getting everything in and optimizing the
   core engine. As a result, some game stages are VERY slow - due to scaling
   and insane amounts of overdraw!

Q. "What are the future plans for the project?"

A. Next up I will be implementing the gameplay. I may release further demos
   depending on how long this takes. I’m also keen to produce a series of
   detailed technical videos about OutRun’s codebase and the process of
   porting the game.

Q. "Will you eventually release the source code?"

A. Partially. I’m interested in collaborating with others further down the
   line. In particular, the code that handles Sega’s video hardware would
   facilitate other ports of Sega arcade titles. Some of these games are
   substantially simpler than OutRun and would run on slower Amigas.
   Right now, I’m content in just keeping this as a personal project and
   challenge.


------------------------------------------------------------------------------
Acknowledgements & Thanks
------------------------------------------------------------------------------

* The English Amiga Board community for answering my questions
* The maintainers of Visual Code Amiga Assembly
* Toni Wilen for WinUAE
* E. Th. van den Oosterkamp for Bare-Metal Amiga Programming
* Kalmalyzer’s C2P collection
Download Here:
https://drive.google.com/file/d/131b...ew?usp=sharing

I'd welcome compatibility and performance reports. Please list out your hardware, and use the debug values displayed at the start line before you've interacted with the engine. For example, I get on an A1200 + TF1230:

Logic: 4D
Road BG: 8
Road FG: 42
Tiles: 40
Sprites: 819
C2P: 1F6
reassembler is offline  
Old 22 March 2024, 17:44   #146
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
A1200 pistorm32 (rpi3):
LOGIC 5
Road bg 5
Road fg 2
tiles 2
sprites 145
c2p C5

(some of them are flickering a bit up and down 1, rounded up)

Capture (from very bad capture device): https://i.imgur.com/VFlB1K7.mp4
paraj is offline  
Old 22 March 2024, 17:47   #147
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
Quote:
Originally Posted by paraj View Post
A1200 pistorm32 (rpi3):
LOGIC 5
Road bg 5
Road fg 2
tiles 2
sprites 145
c2p C5

(some of them are flickering a bit up and down 1, rounded up)
lol - those speeds are insane. It's probably going to run at a full 60fps for you, which is faster than the Arcade game ran!
reassembler is offline  
Old 22 March 2024, 17:58   #148
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
Quote:
Originally Posted by reassembler View Post
lol - those speeds are insane. It's probably going to run at a full 60fps for you, which is faster than the Arcade game ran!

More realistic, B1260/50Mhz:


https://i.imgur.com/HG4CC7R.mp4

Logic 1F
Road bg 5
Road fg 29
tiles 3A
sprites 2EC
c2p 12F
paraj is offline  
Old 22 March 2024, 18:02   #149
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
Well, that's promising that it runs on other setups other than just my own! Thanks for testing.
reassembler is offline  
Old 22 March 2024, 18:07   #150
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,996
PiStorm with CM4 is a tad lower.

Logic 1/2
Road bg 4/5
Road fg 0/1
tiles 1/2
sprites 33ish
c2p B8/B9

VBlanks 0
Dunny is offline  
Old 22 March 2024, 18:26   #151
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
I guess the C2P is still time consuming on the PiStorms due to inevitable chip ram speed.
reassembler is offline  
Old 22 March 2024, 18:35   #152
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
Quote:
Originally Posted by reassembler View Post
I guess the C2P is still time consuming on the PiStorms due to inevitable chip ram speed.
Chipram/chipset accesses are essentially the only bottlenecks there. Pistorm32 can do chipmem writes at full 7MB/s, my B1260 only gets ~5.5. Reads are slower on both, but you shouldn't really be doing many of those.


I'm a bit surprised the sprite part is not much faster on pistorm, what does that cover? Are you doing everything in chunky mode until c2p or doing some things in planar mode?

Great work so far btw
paraj is offline  
Old 22 March 2024, 19:10   #153
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
Yes, sprites are completely chunky based and everything is in fast ram. I don't even think my brain could handle 4-bitplane scaling sprites in planar mode. I suspect even if it could the added overhead of rotating/shifting data would soak up the savings of not using c2p. It's a shame the A1200 didn't ship with hardware c2p akin to the CD32. But I'm probably not the first person to mumble about Commodore's hardware decisions in their later years!
reassembler is offline  
Old 22 March 2024, 19:39   #154
gingerbeardman
Registered User
 
gingerbeardman's Avatar
 
Join Date: Apr 2010
Location: UK
Posts: 61
Quote:
Originally Posted by reassembler View Post
Code:
Horizontal line between tilemaps and road layer at times. Tricky one to
   solve as it’s the result of extreme (but necessary) rendering
   optimizations.
Might a quick and dirty workaround be to extend the bottom row of the tilemap with its main colour? So the mountains, etc are simply taller. I mean, I don't know if this is feasible
gingerbeardman is offline  
Old 22 March 2024, 19:41   #155
tomcat666
Retro Freak
 
tomcat666's Avatar
 
Join Date: Nov 2001
Location: Slovenia
Age: 51
Posts: 1,647
Here is a video of it on A1200 with pistorm32 CM4 2.2Ghz ... you can see the numbers in the video I intentionally went to the LEFT at the first intersection because of the sprites being blitted there.

It is FAST ! The only time VBlanks is at 1 is at the absolute very beginning, then it is 0 through the whole game:

[ Show youtube player ]

Numbers at the beginning:

Logic 2
Road BG 4
Road FG 1
Tiles 1
Sprites 8C
C2P BA

Last edited by tomcat666; 22 March 2024 at 22:42.
tomcat666 is offline  
Old 22 March 2024, 21:24   #156
pixie
Registered User
 
pixie's Avatar
 
Join Date: May 2020
Location: Figueira da Foz
Posts: 362
I didn't get mine to work, it builds successfully the files, but I only get a beige scroll
pixie is offline  
Old 22 March 2024, 22:07   #157
Havie
Registered User
 
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,894
Quicka and dirty YouTuve video running on a Vampire 1200:

[ Show youtube player ]

Stats:

Logic 9
Road BG 4
Road FG B
Tiles 5
Sprites 59
C2P C1

Amazing work!
Havie is offline  
Old 22 March 2024, 23:53   #158
reassembler
Registered User
 
reassembler's Avatar
 
Join Date: Oct 2023
Location: London, UK
Posts: 92
Quote:
Originally Posted by pixie View Post
I didn't get mine to work, it builds successfully the files, but I only get a beige scroll
What are your Amiga's specs?

In other news I did try the HOMM2 C2P rendering routine from Meynaf in place of the one I was already using, but it was slightly slower on hardware. I guess that C2P is pretty much as fast as it's going to get unless I do something destructive like reduce the screen height.
reassembler is offline  
Old 23 March 2024, 06:57   #159
pixie
Registered User
 
pixie's Avatar
 
Join Date: May 2020
Location: Figueira da Foz
Posts: 362
Quote:
Originally Posted by reassembler View Post
What are your Amiga's specs?

In other news I did try the HOMM2 C2P rendering routine from Meynaf in place of the one I was already using, but it was slightly slower on hardware. I guess that C2P is pretty much as fast as it's going to get unless I do something destructive like reduce the screen height.
I'm running on winuae
pixie is offline  
Old 23 March 2024, 07:04   #160
Lunda
Registered User
 
Join Date: Jul 2023
Location: Domsjö/Sweden
Posts: 35
030 70MHz

Logic: 2B
Road BG: 5
Road FG: 1F
Tiles: 1E
Sprites: 591
C2P: 11A

Looking great! Pretty fast on 030 too.
Lunda 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
Outrun AGA agermose project.Amiga Game Factory 252 18 April 2024 12:57
Better Outrun port for Amiga tekopaa Retrogaming General Discussion 399 14 April 2022 17:56
Outrun adfs macce2 request.Old Rare Games 3 18 April 2021 21:22
would you like to have an Outrun like for Aga? sandruzzo Retrogaming General Discussion 50 30 January 2013 12:03
Aweb: New APL 3.5Beta AOS4 PPC code + Milestone: KHTML porting started Paul News 0 05 November 2004 11:21

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 04:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10583 seconds with 16 queries