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.
@stephenwhite5062 жыл бұрын
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.
@ecernosoft30969 ай бұрын
Do you have 680x0 code for setting this up each frame?
@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 Жыл бұрын
Great description. Always wondered how the memory was handled for scrolling games.
@zedrcom3 жыл бұрын
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.
@WeijuWu3 жыл бұрын
Thank you, I am sometimes wondering whether the things I explain are understandable.
@ScoopexUs3 жыл бұрын
Rock'n'Roll is one of my faves too
@CelentAle3 жыл бұрын
W Amiga! New AmigaOS4 / 5, coming soon on MULTICORE! 😱 💪😎
@carlosd.58143 жыл бұрын
Great tutorial!! Clear explanation :) I´m already waiting for the next tutoial of this amazing serie
@chromosundrift2 жыл бұрын
Fantastic series!!
@ea4aatimanol1663 жыл бұрын
Nice!, clear and very well explained. Many new ideas for me and this is great for coding. Thank you for your work!!
@WeijuWu3 жыл бұрын
Glad to hear that it's useful to you !
@emrahcey2 жыл бұрын
more Amiga programing please.
@C64Portal3 жыл бұрын
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!
@WeijuWu3 жыл бұрын
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.
@C64Portal3 жыл бұрын
@@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. :)
@tekk99953 жыл бұрын
Great stuff (again!)
@Mark-pr7ug2 жыл бұрын
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.
@msmalik6813 жыл бұрын
Very interesting
@frankroger14292 жыл бұрын
In other words, if I want 8-direction scrolling (vertical + horizontal) do I need 9 screens? Are there more elegant methods here?
@XXXXXX-dy5fs3 жыл бұрын
Can your code samples be used directly within the SAS C compiler on the Amiga, or Storm C?
@WeijuWu3 жыл бұрын
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-dy5fs3 жыл бұрын
@@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-dt2eq3 жыл бұрын
Where to find the so called "RATR0 game engine" ?
@WeijuWu3 жыл бұрын
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.