Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Buy/sell/swap Atari things BBS
 
Re: How much should a STE cost?
Posted by: evil Dec,13.2012-18:50 

I'd say there are a few ways to look at how to write a demo. It can be done very system friendly, and as you're used to, assemble to an absolute address and jmp there.


I'd say for an easy run-in, just using a framebuffer without further tricks (rasters, borders, plasma and so forth) is a good beginning.

Basicly what you do is;

1. Enter supervisor mode (so you can access hardware reigsters)
2. Save the hardware regs you will use in the demo, usually palette, screen resolution, screen-refresh, video pointers) and save the VBL vector, as you will want your own VBL without any OS shit running there
3. Mainloop / VBL-interrupt
4. Restore above mentioned registers and VBL vector, then pterm.

The OS will relocate the code for you and if you do the save/restore properly, you will return nicely back to the OS as well.


Here is a simple source I threw together now that does this:
http://ae.dhs.nu/tmp/shw_base.zip

About 380 bytes exec, could be smaller but it's quite readable now (I assume you are familiar with 68000).


About toolchain; I'm using VASM/VLINK together with make (Makefile included in the zip) but I'm on OSX and as you wrote I assume you're on Windows? VASM/VLINK is portable and I'm sure somebody have ported it to Windows. In fact, it can be built directly with VASM without make/VLINK, but then I would have to fiddle with Eclipse. I rather code than fiddle ;)

Anyone who can help here to fix him Windows binaries of VASM?


Anyways, when you got the hang of stuff (interleaved bitplanes being the most usual source of frustration among new coders) starting with rasters and more hardware-close things could come next.


Oh, one more thing: Music.
The easiest is using SNDH contained music, there are just three calls to make for those, assuming the SNDH is unpacked in beforehand:
1. moveq #1,d0 ; bsr sndh (init)
2. bsr sndh+8 (from vbl)
3. bsr sndh+4 (exit)


In case I messed up, I'm sure someone will correct me :)

--
Anders Eriksson
ae@dhs.nu







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
How much should a STE cost? Sdw Dec,12.2012-10:39
  Re: How much should a STE cost? evil Dec,12.2012-16:15
    Re: How much should a STE cost? Sdw Dec,13.2012-00:18
      Re: How much should a STE cost? PeP Dec,13.2012-11:38
        Re: How much should a STE cost? Sdw Dec,13.2012-11:51
          Re: How much should a STE cost? PeP Dec,13.2012-12:05
            Re: How much should a STE cost? Sdw Dec,13.2012-13:49
      Re: How much should a STE cost? ggn Dec,13.2012-11:38
      Re: How much should a STE cost? evil Dec,13.2012-16:39
        Re: How much should a STE cost? Sdw Dec,13.2012-16:51
          Re: How much should a STE cost? evil Dec,13.2012-18:50
            Re: How much should a STE cost? ggn Dec,13.2012-23:49
              Re: How much should a STE cost? Cyprian Dec,14.2012-10:32
                Re: How much should a STE cost? ggn Dec,14.2012-15:43
              Re: How much should a STE cost? Sdw Dec,14.2012-20:32
            Re: How much should a STE cost? Sdw Dec,14.2012-20:31
              Re: How much should a STE cost? ggn Dec,15.2012-01:18
        Re: How much should a STE cost? Sdw Dec,13.2012-16:52
  Re: How much should a STE cost? Shalroth Aug,17.2013-16:25


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson