12 November 2009, 19:32 | #1 | |
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
c64 vs Amiga demo coding...
In another thread (re: Blitter Sweet) Photon said:
Quote:
I'm still a relative newcomer to making demos on the c64, only having started in late 2007. I've released (or co-released) 5 or 6 products now, mostly consisting of intro type pages (and one 3 part demo) which try to showcase the new effects and tricks I've learned along the way. One of my parts was inspired by the Skid Row crack intro of Double Dribble on the Amiga. I sat there watching it thinking..."I wonder how I could implement that effect on the c64?" I started sketching things down in my notebook, and a few days later I had it. It was actually a lot of fun...the effect in question was the scroller where characters are rotating around Z as in the axis extending perpendicular to the monitor toward the viewer. I can see how that design/development topology could work in reverse on the Amiga (once I start to master its custom chipset). See a cool effect on a c64 demo...and knowing already how they did it, imagine a way to implement the same thing on the Amiga, yet take advantage of the blitter, copper, etc to get fancier with that routine and take it to the next level. I agree about the elegance of the 65xx family of processor, about how it seems "cleaner", yet as I study the Amiga in depth for the first time, it seems less "dirty" the more I learn. I think coding 6510 (er, actually the VICII, which is what you are really coding when you make 64 demos) and the 68k[Denise/Paula/Agnes] simultaneously, at this point for me is complimentary...especially for my design/style skills. I think that's where the real prize lies when porting between these two systems. -Brett |
|
12 November 2009, 21:05 | #2 |
Registered User
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 366
|
I agree totally, I find myself thinking of effects that would be more suitable for other machines while I'm coding another - just leads to more interesting coding on multiple platforms!
At least, that's the theory... usually I just file it away in the TODO list and go back to sleep. |
12 November 2009, 21:08 | #3 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
|
|
12 November 2009, 21:28 | #4 |
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Yes! I would love to see something from your mind's eye make it to the raster!!!
I'm working on my stuff...but it's going to probably be at least a few more weeks or more before my first 'one part' demo on the Amiga. I really need to learn all the basics first. -DP |
13 November 2009, 00:33 | #5 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
OK, checked out a few KrionyX demos on Youtube - if you are so inclined, please share them on Pouet.net and Demoscene.tv so sceners can find them easily and their release is noted. (Unless there's a division between European and US demoscene and they've already been released on US equivalents that I ehm have no idea what they are.)
Maybe I'm stuck in my European scene, I wouldn't know, hehe. But it seems to me US prods are rare? AAAnyway. Notepad sketching=good idea I think I will have a gridpaper notebook on my desk on the day I croak :P With excuses beforehand for any mistakes: To learn Amiga coding, basically you can go from any assembler platform, and to understand how the Amiga works, just add "CPU and custom chips fight over the chip memory" (where sound samples, picture buffers, and blitter I/O data resides). Basically you have 1/50 or in your case 1/60 second worth of DMA word accesses to the chipmemory. If the CPU is calculating internally and code resides in true fast-memory, it doesn't need a single of those cycles. That means you can have all the bitplanes on, reading from disk, showing sprites, running the copper, playing samples, all that jazz (by which I mean DMA accesses) at the same time as running code at full speed. If you want the demo to run on 0-fastram Amigas (A500/+, A1200, even A4000T came in 0 MB fastmem variants I think) however, you need to write the code to run in chipmem and take into account this DMA vs CMA fight. If it runs at acceptable speed then, you know that's the slowest it will go. If you leave this base platform and go for AGA+fastmem, run the code in fastmem and minimize data access to chipmem from the CPU. Then, basically only > 4 bitplanes will affect CPU performance, and the only other big chipmem-cycle-hogger is the blitter, and only while it is blitting, ofc. This was to get good performance and to understand how the chips interact. A fixed platform is good to compare performance ofc, but sooner or later the limit will be hit. Finding (out what sets) the limits is a nicer challenge to me than 'beating another guy's dot count or bob record' nowadays, ie. a demo can be perfect and impossible to improve significantly; the demo is good in an absolute way instead of in a relative way. Competition is sometimes very much in the way of innovation. Coppershade.org was supposed to have coder's tutorials, and even though a few have been written, as usual I swarm myself with more "gotta finish" projects, sigh... If you want a starting point, get Hardware Reference Manual and a bible. The latter being a proper Programmer's Manual for the CPU model you intend to code for. If you already have these, you have the facts. From there I suggest very simple experiments (experimenting is by far the most enjoyable time spent in an assembler to me ), like starting up a screen and plotting pixels... "OK, now I can plot pixels with the CPU... now to move them I need a clearscreen blit... OK, they're moving. What can I make with them..." etc etc Just saying experimenting is fun and lets the real behavior of the chipset be properly implanted in your brain :P If you're good you can just start coding a demo and look things up in HRM. Assembler, hardware register include file or a register map, and some converters for music and graphics and off you go. I'm a bit skeptical to the porting thing, for one it's not certain it's done the same way at all on Amiga, and secondly the Amiga chipset has so many more possibilities - it was made to be explored... Certainly the NTSC demoscene platform has had very little attention devoted to it when it comes to performance limits and which effects are possible, so you could be elite in no time, hehe Edit: For sure, you will be happy to get rid of the anal raster timing, it will be a doddle to use the copper I think! If you want inspiration I thought of Mahoney & Kaktus on Amiga, who both came from C64. Last edited by Photon; 13 November 2009 at 00:39. |
13 November 2009, 01:12 | #6 |
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Photon,
Well, there's nothing special in the grand scheme of things about my KrionyX stuff so far, it's basically a personal documentation of the learning process in demo form...at least that's the way I mostly see it, that and an expression of my desire not to see the "old school" colorful schemes and "hit spacebar" traditions of the old 64 scene pass completely under the shadow of modern PAL trackmos with trendy effects, and pastel color schemes. Mind you, my favorite demos are PAL, of course, but were talking about 10's of thousands of demos versus a few hundred, so a simple consideration of statistics predicts the best stuff is European. And yes, your observation is correct...very few people from North America and Japan (NTSC) made demos, and today, there are less than a handful of guys actively coding in the U.S. I am relatively proud of the fact that I overcame a lot of stigma and doubt to enjoy the limited success I've had in the community. I am also in The Phantom's group "Forces of Evil", who recently released a halloween demo..my page was the 2nd, where I have an expanded sprite scroller in the side borders, as well as a group abbreviation logo made of raster splits (a lot harder on the c64 than the amiga...have to be cycle exact timed). I figured out how to open the side borders using "dec $d016, inc $d016" at just the right cycle (listening Paul?)...that was a fun moment, and as you say, it came through experimenting with assembly, and the hardware. I do have the HRM as a text file, and Paul gave me the .pdf, so I'm very well set, and I have an instruction set for the 68k as well. Also, I won an actual paperback HRM off of ebay and it is on the way, but it was shipped from the U.K., so I don't know when to expect it. I've been learning a lot in the exact manner you describe, so it's good to know that I'm on the right track. It's a lot of new techniques and things to get used to, but every day I find my control over the chipset aggrandizing. As far as porting goes, I don't think I really should have used the term "porting" per se...I was speaking more conceptually, like from a design perspective. You see something that looks good in a demo on one machine, and wonder how you might be able to take that concept and express it in code on the other machine, both as a technical challenge to yourself, and also a way to make the effect look nicer/"cooler" in its new incarnation on another architechture/chipset. I did that with the rolling characters effect on the Skid Row cracktro and took it to the c64. In the process I had to learn several new coding techniques. So it expanded my mind from both and technical and creative point of view. Not that I plan on doing that very often, since making something from scratch is probably most rewarding....but every now and then. Or it could be that I am not very creative and this is my form of denial. That would at least make me somewhat creative though. You mention that NTSC demo territory is mostly virgin. I'm not surprised, but if I follow my likely course and begin to write code for Retro, I'll be coding PAL routines...which might make it harder to test my code on my A500 OCS hmmm. The prospect of eventually making NTSC products on the Amiga is interesting, but not that compelling without at least one other person to talk to about it. A lot of this, for me, is about the human element...talking to each other about code, new routines, ideas, fun past times. That's what I like about the CSDb, always something going on, being released, people to talk to, things happening. Of course, people here are very nice, generous and a bit less self important. No information is too proprietary to share...and I like that! Kaktus and Mahoney!!! I love their stuff. I have always liked their C64 demos..with unreadable scrollers (like their ROR scroller for instance) and interesting tunes. In their scrolltexts they talk about how they are about to "go Amiga" and then I guess they did. A couple of nights ago I watched one of their amiga demos...the one with goldfish sprites (or were they bobs) swimming around and crazy samples. I actually enjoy the anal process of counting cycles...I guess it reinforces the feeling of being in control of the hardware (the thing that makes a demo a demo) and it's a big reward when I add up the cycles from a bunch of instructions, run the program and find that my arithmetic was correct and the routine works bug free! It was a 2 year struggle getting to that point and I still have much to learn on the C64, not to mention the Amiga. Thanks for your ideas Photon! -Brett Darth Plagueis/KrionyX/Forces of Evil/Avatar |
13 November 2009, 03:01 | #7 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
NTSC or PAL, well there's not many doing OCS stuff on either platform at the moment, depends on if you want to show off across the pond or domestically I guess :P
If you have a 15KHz RGB CRT-monitor such as C1081 or C1084s, it should take both signals (but not via non-RGB such as composite, must be an RGB cable), and you can use the brick power supply for both Amigas. I do have some spare A500s if that's what you want to code on... let me know and I can give you a good price for one with 1MB memory and an external drive. If you have or buy an A500+ domestically, I think you can mod it with some tracecutting, soldering two points and changing the crystal. ECS models and up support both ntsc and pal video out, but CPU runs at NTSC speed. Correct me if I'm wrong someone. You can code for NTSC, then test in WinUAE with PAL timings - however keep in mind, Cycle Exact is pretty accurate but not perfect. And I am not one to discourage coding on the real thing Coding for PAL in America could surprise some sceners here in a good way I think |
13 November 2009, 03:21 | #8 | |||||
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Photon,
Quote:
And as far as OCS...it's the Amiga I bought in 1988 and enjoyed until 1992 (when a power surge killed it). Quote:
Quote:
Quote:
Quote:
-Brett |
|||||
13 November 2009, 07:58 | #9 | |||
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Quote:
Quote:
Quote:
|
|||
13 November 2009, 09:31 | #10 | ||||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
They don't even seem to have a separate A500 section at parties - you have to make your A500 prod run on the compo A1200. That's still cheating though to my mind - even though you might not be using AGA graphics modes your demo is still more than likely running on a 68060 on one of those machines so you're not showing off that your prod runs like a dream on a vanilla 68000 Amiga. I think I remember reading something somewhere from Breakpoint saying that if the A500 demo didn't work on the compo A1200 it could still be entered in the console competition. Personally I would include ECS machines in with the OCS ones in terms of being proper old skool Amigas (yes Photon I know this means I should be hunted down as a traitor! ) and I think more stuff should be made for these Amiga platforms. I would like to understand and code some of the A1200 style demo effects in the future and I love lots of AGA demos but my heart is still truly with the original demo stuff I saw as a kid. I say keep it Retro! Quote:
Quote:
Quote:
From a practical standpoint I agree too - even if you code in the emulator the stuff *must* be tested on the real deal prior to release. I've had this experience myself recently - my vector demo part looks perfect in WinUAE but suffers occasional graphics glitches in one of the objects when running on the real thing. Toni's doing some testing to see if he can see why the emu and the real thing differ on it at the moment... |
||||
13 November 2009, 19:00 | #11 | ||||||
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
-Brett |
||||||
13 November 2009, 21:12 | #12 | ||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
As to how you could tell whether you have a fat or fatter Agnus chip in your A500 I'm not sure. You could look inside - one of the hardware gurus could tell you what to look for. Alternatively, maybe there's a software check you can do just like you can to ascertain what processor the host Amiga is running. One of the software gurus could probably tell you this. Or you could always ask the guru's guru Toni - he'll know for sure. |
||
13 November 2009, 22:15 | #13 |
Registered User
Join Date: Mar 2009
Location: moon
Posts: 373
|
Not sure how reliable it is, but I seem to recall that red and green LEDs means OCS Agnus, and green and yellow LEDs means ECS Agnus.
|
13 November 2009, 22:37 | #14 | |
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Quote:
If that's reliable then my 2nd Amiga here is definitely an ECS Agnus, as I suspected. @PMC: I did not know that the "+" was written on it. Ok, that makes things easy with the plus. heh. |
|
13 November 2009, 22:39 | #15 | |
Registered User
Join Date: Aug 2008
Location: Göteborg / Sweden
Posts: 237
|
Quote:
|
|
13 November 2009, 22:44 | #16 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ MagerValp - \o/
Nice one for letting me know that - I didn't realise! Really good news! |
13 November 2009, 23:39 | #17 | |
coder
Join Date: Jul 2009
Location: a galaxy far far away
Age: 50
Posts: 84
|
Quote:
-Darth Plagueis/KRX/FOE/ATA Edit: I just saw the link to your paradroid site. So it is you. cool. |
|
16 November 2009, 18:35 | #18 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,753
|
Quote:
A500 with extra 512k slow or A500+ or A600 doesn't really matter, basically the same stuff is possible. A500 with 512k chip only can be a bit of a hassle. The 'hassle' is that with a few screen buffers and a good Soundtracker module, you can pretty much forget about adding a Divide table or other things to make certain effects possible. Because the OS will have used a huge chunk of the 512k, so if you want it to exit to CLI again... You can disallow exit to CLI ofc, or make a trackmo. Or use a tiny chipmusic tune, or load demoparts separately ('Dosmo'? ). |
|
16 November 2009, 20:56 | #19 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
I think a lot of people forget to make good use of the memory too, like reusing memory when it's not needed anymore, instead of the lazy approach and just allocate enough memory to hold all demo parts in their entirety in memory at once.
Another thing to think of is to split sections up to avoid problems with fragmented memory. 300k of contiguous RAM might not be found, but if you split your bitplanes, pictures etc. up into 6x 50k sections or whatever it's more likely they'll fit somewhere. BSS space in code and data sections can be useful too, if you for some reason won't be crunching your program. |
16 November 2009, 21:07 | #20 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Leffman - I always used to use multiple sections in my code but recently with the megademo parts I've used single large code_c sections as the code / data all has to be strictly pc relative for the trackloader.
Now, I've always been told that if possible, using pc relative code is desirable but obviously this doesn't work across sections. Have you got any advice for a nice compromise? - ie. strategies for using multiple sections but still using as much pc relative code as possible? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any Amiga talks like the "Behind the scenes of a C64 demo?" one | crabfists | Coders. General | 9 | 08 June 2012 00:32 |
Enforcer 2 (C64) - Playable Demo | Retro-Nerd | Retrogaming General Discussion | 3 | 13 June 2008 00:53 |
C64 Demo DVDs | Dizzy | Nostalgia & memories | 5 | 02 June 2006 14:10 |
C64 Demo req - off topic :) | kafiend | request.Demos | 6 | 15 November 2002 04:35 |
C64 demo by Quadlite and WinUAE | andreas | support.Demos | 0 | 08 March 2002 11:37 |
|
|