Amiga Scrolling & Tiled Graphics - Amiga Hardware Programming in C

  Рет қаралды 3,950

Wei-ju Wu

Wei-ju Wu

Күн бұрын

Пікірлер: 27
@pinkopinko9277
@pinkopinko9277 3 жыл бұрын
Very good and detailed explanations! Another option to scroll horizontal is to use only a single screen and just increase the bitplane pointer without any wrapping. You will need to add the maximum level width (but just one line) to your bitplane bottom. This is an easy solution when you don't need unlimited vertical scroll.
@stephenwhite506
@stephenwhite506 2 жыл бұрын
To save memory you don't need to have a 2x display buffer. When scrolling vertically you split the screen in two instead. For example, if the screen has scrolled by 100 pixels, your bit plane pointers will move down the display buffer 100 rows. But instead of the bottom of the screen moving into the second part of the 2x buffer, have it move into the top of the existing single buffer. This is done by having the copper or the cpu change the plane pointers to the top of the single buffer when the raster reaches the line (screen height - 100). With horizontal scrolling it is a little more complex. As your bit planes are interleaved then instead of scrolling into a whole new buffer you already have plane0 scrolling into plane1 and plane1 into plane2 and so forth. So you can scroll horizontally as many screens as you have bit planes and all your extra buffer needs to be in one row of pixels larger. So if you have 5 bit planes you can scroll 5 screens and your buffer only needs to be one row larger. If you want to scroll 10 screens then your buffer needs to be two rows larger etc. If you want to scroll an infinite number of screens horizontally then you need to start applying the vertical copper split technique as well. This way you can scroll vertically, horizontally or both an infinite number of screens with only little more than one display buffer. This saves you more chip ram that can be used for other things.
@ecernosoft3096
@ecernosoft3096 9 ай бұрын
Do you have 680x0 code for setting this up each frame?
@ranska2506
@ranska2506 Күн бұрын
What a nice work ! I love what you do ! May be a variation on optimisation can be a good topic for a serie of vidéo.
@naviamiga
@naviamiga Жыл бұрын
Great description. Always wondered how the memory was handled for scrolling games.
@zedrcom
@zedrcom 3 жыл бұрын
These video tutorials are amazing! Very fun and understandable explanations of what's going on under the hood. Thanks for all the work you putting into them.
@WeijuWu
@WeijuWu 3 жыл бұрын
Thank you, I am sometimes wondering whether the things I explain are understandable.
@ScoopexUs
@ScoopexUs 3 жыл бұрын
Rock'n'Roll is one of my faves too
@CelentAle
@CelentAle 3 жыл бұрын
W Amiga! New AmigaOS4 / 5, coming soon on MULTICORE! 😱 💪😎
@carlosd.5814
@carlosd.5814 3 жыл бұрын
Great tutorial!! Clear explanation :) I´m already waiting for the next tutoial of this amazing serie
@chromosundrift
@chromosundrift 2 жыл бұрын
Fantastic series!!
@ea4aatimanol166
@ea4aatimanol166 3 жыл бұрын
Nice!, clear and very well explained. Many new ideas for me and this is great for coding. Thank you for your work!!
@WeijuWu
@WeijuWu 3 жыл бұрын
Glad to hear that it's useful to you !
@emrahcey
@emrahcey 2 жыл бұрын
more Amiga programing please.
@C64Portal
@C64Portal 3 жыл бұрын
Great vide as always. And I must say you motivated me to start working in C coding for Amiga. I think I will switch form Blitz Basic to C now as after your tutorials I have parts of the code I needed ready. Thanks again!
@WeijuWu
@WeijuWu 3 жыл бұрын
Thank you ! I picked C because it is pretty popular on the Amiga and since I work as a software developer, it is not a big switch for me between what I use on a my daily basis (I actually use Python most of the time, but structurally it's not too much of a change) and this. I'd generally say use the language that works for you, if one finds themselves struggling with a type of language that it takes the fun out of it, then go with the better fit. In the end programming is only one part of a project. I hope the concepts I am talking about can be transferred across language boundaries.
@C64Portal
@C64Portal 3 жыл бұрын
@@WeijuWu Sometimes control over the memory is crucial and with Basic I don't feel like I in full control. Besides I did some asm programming here and there (c64 and amiga in the past) so I want to have a full control. What I missed was some C specific parts that you showed here in the tutorials. regarding the tools I use I will use some of your ratr0 python loos but I did my own when working with Tiled. For example I have my own converter that converts from Tiled exported Lua and there I have my Lua scripts that produce asm code ... mostly dc.w kind of things. Anyhow thanks to your tutorials I was able to write my own procedures in C that mimic the ones I used in Amiga Blitz Basic. My latest one achievement is a module player... I wait for more. :)
@tekk9995
@tekk9995 3 жыл бұрын
Great stuff (again!)
@Mark-pr7ug
@Mark-pr7ug 2 жыл бұрын
As I remember, perfect HD scrolling. After much experimentation, I understood that 3 horizontal displays had to be utilised. Each displaying the same image. If I didn't use this approach, any attempt at smooth scrolling kind of destroyed the logic of my code. A display that became messed up. It later led me to understand that a fluid game code on the amiga only worked well in a 8 colour environment with additions such as multiplexed sprites & good use of the copper chip.
@msmalik681
@msmalik681 3 жыл бұрын
Very interesting
@frankroger1429
@frankroger1429 2 жыл бұрын
In other words, if I want 8-direction scrolling (vertical + horizontal) do I need 9 screens? Are there more elegant methods here?
@XXXXXX-dy5fs
@XXXXXX-dy5fs 3 жыл бұрын
Can your code samples be used directly within the SAS C compiler on the Amiga, or Storm C?
@WeijuWu
@WeijuWu 3 жыл бұрын
I usually write everything with VBCC, for the reason that it is free, easily to obtain and supports more recent specifications of the C language standard. The 2 main things people might have to look for is that the code examples use automatic library management, which most Amiga C compilers should be able to do, but e.g. SAS/C needs a fairly recent version, I occasionally use 6.58. Storm/C is gcc under the hood as far as I know, which I have not used on the Amiga. The other feature I use is single line comments, which is also a feature of more modern C standards, but if your compiler does not support it, you can simply replace them with the old /* */ form.
@XXXXXX-dy5fs
@XXXXXX-dy5fs 3 жыл бұрын
@@WeijuWu Thanks for explaining that. I plan to try VBCC at some point. I'm just trying out SAS/C , the lastest one and so far it seems to work on my emulation. To begin with I'm just tryng some very simple programs to learn how to use the compiler and Amiga specific features. Thanks for your videos. 👍 Once I get around trying out your demos and examples, I'll give something back. 😆
@Alexander-dt2eq
@Alexander-dt2eq 3 жыл бұрын
Where to find the so called "RATR0 game engine" ?
@WeijuWu
@WeijuWu 3 жыл бұрын
Hi, I should really remove the references to the RATR0 engine and Spartan language, because they were experimental projects. There was actually really a RATR0 engine, which was used to write a "Fix-it-Felix" clone, until I decided to scrap the project and use the code as the base for a hardware programming tutorial. Maybe there will be something like an engine or at least a game programming library at some point, but not until I've made a number of games with it.
@gawd0r
@gawd0r 3 жыл бұрын
This is great! Thanks for the explanation!
Pong for Amiga: How to write a video game in a day.
7:16
Wei-ju Wu
Рет қаралды 3,5 М.
Amiga Hardware Programming in C Part 5 - Blitter Fundamentals
19:38
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
A day in the life of an Amiga Team17 Developer | ЯReheated
24:59
Retro Recipes 🕹️ vintage tech + tv
Рет қаралды 30 М.
Amiga Hardware Programming in C Part 4 - Sprites
18:04
Wei-ju Wu
Рет қаралды 8 М.
NES Scrolling Basics featuring Super Mario Bros. - Behind the Code
17:25
Displaced Gamers
Рет қаралды 134 М.
How I Built A LEGO Treadmill That Moves In EVERY Direction
18:06
Banana Gear Studios
Рет қаралды 1,1 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
Looking back at Devpac 3 - Amiga Assembler, Linker & Debugger
20:54
Amiga A1200 Refurb
45:31
Tim's Retro Corner
Рет қаралды 2,5 М.
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 7 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 798 М.
Programming a 40KB NES Game (in Assembly)
14:33
Inkbox
Рет қаралды 175 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН