home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4003 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  10.3 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Demo/game to OS friendly part II
  5. Date: 15 Feb 1996 16:54:48 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4fvogo$mmf@sunsystem5.informatik.tu-muenchen.de>
  9. References: <4e0jhq$f0q@sunsystem5.informatik.tu-muenchen.de> <4e114i$4o8@serpens.rhein.de> <4e371l$92b@sunsystem5.informatik.tu-muenchen.de> <4e3jld$la@serpens.rhein.de> <4e5k20$rva@sunsystem5.informatik.tu-muenchen.de> <4e64u7$a2u@serpens.rhein.de> <4e9n67$ron@sunsystem5.informatik.tu-muenchen.de> <4eb61a$4nd@serpens.rhein.de> <4ej5du$g8u@sunsystem5.informatik.tu-muenchen.de> <4ejmsc$njl@serpens.rhein.de> <4eqn93$p6r@sunsystem5.informatik.tu-muenchen.de> <4fsjfk$odj@serpens.rhein.de>
  10. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  11. Originator: fischerj@hphalle5.informatik.tu-muenchen.de
  12.  
  13.  
  14. In article <4fsjfk$odj@serpens.rhein.de>,
  15. mlelstv@serpens.rhein.de (Michael van Elst) writes:
  16. |> fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer) writes:
  17. |> 
  18. |> >which value in gfxbase is that ? what value is it for OCS/ECS blitters ?
  19. |> 
  20. |> such questions make this kind of discussion sooooo boring.
  21. naah it's not really a problem.
  22.  
  23. |> 
  24. |> I told you that several times. If you keep forgetting why can't you simply
  25. |> consult the manuals and include files ?
  26.  
  27. I got autodoks, and they don't explain quite well :\
  28.  
  29. So I only can guess ;) long *blitter
  30. nooo, that would be too easy. next try.
  31.  
  32. UBYTE ChipRevBits0 ?
  33. mhm big GFXB_BIG_BLITS, GFXB_HR_AGNUS... bit 0 of the ubyte must be 1 ? :)
  34.  
  35. mhm but then the fact I can't test for OCS (no GFXB_AGNUS) in this byte
  36. lets me think I'm on the wrong bits...
  37.  
  38.  
  39.  BTW next page (wow c0d3r reading RKM :D ), gfxmacros.h,
  40.  
  41.  #define OFF_VBLANK custom.intena = BITCLR|INTF_VERTB
  42.  
  43.  was there a shutdown fan writing this page of RKM ?
  44.  I thought we were not to poke...
  45.  
  46.  they'd better done a #define IFBLITTER and #define CHIPMEMPLANARBITMAP(bm)!
  47.  
  48. |> That's why FastMem Bitmaps with known structure are most likely not "standard".
  49.  
  50. known structure ? What is in the Flags of a gfx-card bitmap ?
  51. just displayable, $02 ?
  52.  
  53. mhm i guess they would have just extended planeptrs to [10] for AAA ?
  54. somehow I got the impression they already could have written
  55. Dpaint-AAA on V1.2 ;) I mean, a Dpaint that'll be able to work in
  56. 10 planes on AAA or a emulated 10 planescreen on 24bit screen.
  57.  
  58. |> The blitter is ECS compatible and acts on _chip memory_. You have full
  59. |> 32bit registers for the DMA channels. There is no restriction to the
  60. |> 0MB..2MB range _in the interface_. There is such a restriction in the
  61. |> current hardware, but this restriction is met if you use pointers to
  62. |> chip memory (as returned by AllocMem and other functions).
  63.  
  64. I always directly poked that allocmempointers into the dmapointerregs.
  65. or is there a pointer in gfxbase telling where the DMA adress 0 starts
  66. in cpu adress space ? don't shock me! ;)
  67.  
  68. |> 
  69. |> >Aah. so: check for native => planar (that's all, could be in fastmem
  70. |> >or gfx-card vram)
  71. |> 
  72. |> To the CPU it wouldn't make any difference where the bitplanes are.
  73.  
  74. yes. But maybe there could be a bitmap in a DSP-card connetect
  75. via ser: ? ;) cpu wouldn't be able to write to it the conventional
  76. way. Is there a flag telling "non acessable" ? how the bitmaps
  77. look on that A20.. eeh.. tiga card ?
  78.  
  79.  
  80. |> >have I interpreted that right...
  81. |> 
  82. |> Yes.
  83.  
  84. phew :)
  85.  
  86. If ( (bitmap->Flags & BMF_STANDARD) && (gfxbase->ChipRevBits0 &
  87. GFXF_BIG_BLITS) ) printf("yeah a planar ECS blitterable bitmap :)\n");
  88. else printf("Danger! Do not poke.\n");
  89.  
  90. I'm still wondering about the test for blitter. OCS ?
  91.  
  92. Can I put this on my homepage ;) or what else to test for to know
  93. I can directly write to a screens bitmap with both blitter+cpu ?
  94.  
  95. So what if I run a planar mode on a gfxcard but also still got
  96. a AGA-blitter. there seems to be no bit just telling "planar",
  97. bummer. No planar bitmaps on a gfxboard ?
  98.  
  99. Do writers of gfx-card users define new bits in bitmaps flags
  100. (BMB_CHUNKY or whatever...) ?
  101.  
  102. Do I have to set the visible flag in a bitmap I pass to openscreen ?
  103. questions...
  104.  
  105. |> It tells you which chips are present. If you get some address
  106. |> to the custom chips from the system (say in an interrupt server),
  107.  
  108. why the base adress in the register ?
  109.  
  110. |> then use that. Otherwise use _Custom = 0xdff000 as the base
  111. |> address.
  112.  
  113. So my Qblit() function will maybe poke to a different adress
  114. than my OwnBlitter()ed functions. why ?
  115.  
  116. BTW, brainstorming, do I have to call CMOVE() with $dff180 or with $180 ?
  117. both will work on my A1200...
  118.  
  119. |> lowlevel.library does nothing like that and it IS part of AmigaOS3.1. It
  120. but not 3.0 ? 
  121.  
  122. |> is used for dumb and unfriendly code that queries the keyboard or joypad.
  123. |> It also gives simple access to a vblank interrupt and timer.
  124. |> 
  125. |> So that's for c00l c0d3rz that fail to write working keyboard and interrupt
  126. |> code after 10 years of experience.
  127.  
  128. ;)
  129. but the only OSy way for a paralax scroller (someone told me
  130. about having done it). well, OS3.1...
  131.  
  132. Having seen some games that do this on A500,V1.2, I must
  133. say for this case: viva copper overtake!
  134.  
  135. |> 
  136. |> What you are thinking of is specialfx.library.
  137.  
  138. more, a game.library, a multimedia.library :)
  139.  
  140. ParRead(FILE *,char *,int size);    ;)
  141.                                  ^--------,struct msgport* ??
  142.  
  143. |> 
  144. |> >for adapting to each cpu, and for adapting on a ceratin cpu for each
  145. |> >effect to get optimal framerate (and get cpu needing not more time
  146. |> >than for just copying in moast cases).
  147. |> 
  148. |> Obviously you do not want to specify that. The system should chose an optimal
  149. |> method itself (and it might know better than you).
  150.  
  151. mhm doing cpu+blitter c2p, only measuring helps which combination
  152. (how many cpu passes) are fastest for the effect done.
  153. system would have to call my render functions to find out :)
  154. i.e. AmigaDos would play my game :D
  155.  
  156. |> 
  157. |> >But then the area got to be 4 times smaller to outperform my routine :D
  158. |> 
  159. |> *sigh*
  160.  
  161. sigh but true... I intend to write code for using, not for
  162. nice source code.
  163.  
  164. |> 
  165. |> >but the 3pass c2p needs that special planesetup which needs own
  166. |> >copperlists, which will probably only work on PAL/NTSC.
  167. |> 
  168. |> That's why it is pretty unusuable.
  169.  
  170. but aren't most used configs A1200+1084 ? ;)
  171.  
  172. And as the new A1200 seems to have 030-40 but still AGA,
  173. and, horrors, maybe no fastmem, the 3pass method is still
  174. usable.
  175.  
  176.  
  177. |> >On a card with very fast mem, I would have got a pointer to vram and
  178. |> >the update routine would have done nothing. voila direct render :)
  179. |> 
  180. |> And now try the same with a double buffered display and bitmaps that
  181. |> are swapped between virtual memory and graphics card.
  182.  
  183. well, only windoze would do double-buffering with swapping
  184. the screens from HD :D
  185.  
  186. No problem though if you got a MMU.
  187.  
  188.  
  189. |> >But what if I'm about to write kind of extension, something the
  190. |> >current OS doesn't provide ?
  191. |> 
  192. |> That's a rhetorical question. You do not do that. You try to hack around
  193. |> the OS.
  194.  
  195. Okay, the word "extension" is the problem, right ? ;)
  196.  
  197. Well, would you see any chance to get the special plane/spritesetup
  198. without "hack around" on OS3.0 ?
  199.  
  200. You would at least have to bypass CWAIT(). And take care of
  201. all monitor stuff.
  202.  
  203. Well, it would be nice to have this setup as new type of bitmap
  204. just like a screen opened on a gfx-card.
  205.  
  206. Writepixarray8() would be patched to 3pass convert if on
  207. ghost-screen. 
  208.  
  209. bitmap->type=BMF_GHOST :D
  210.  
  211. Well, a clean implementation would need to rewrite all
  212. blt and draw functions...
  213.  
  214. And somehow you would have to determine if a task opening
  215. a screen is to get a standard bitmap or a ghost-bitmap.
  216. a flag of same class like dualpf or ham.
  217.  
  218. |> 
  219. |> You can synchronize with the screen buffers.
  220. You get a signal when buffer was shown a frame, right ?
  221.  
  222. |> 
  223. |> >What should I use WaitTOF for ?
  224. |> 
  225. |> For a simple straight forward synchronization with the display.
  226.  
  227. That's not what I intend to do.
  228.  
  229. My current code runs a pri 127 task doing waittof and then writing 
  230. into my copperlist to interlace the ghost look. As this is chipset
  231. special anyway, I can turn it into a interupt routine.
  232.  
  233. If there was the need of kind of "vblank-int" on gfx-cards,
  234. I'd still use the hipri waittofing task. If there is a driver
  235. that busywaits for TOF, my code would be in deep shit.
  236.  
  237. so far the whole story about me and waittof, which i don't need on
  238. gfxcards anyway.
  239.  
  240. phew.
  241.  
  242.  
  243. |> It is a missing DSKRDY signal. Something that is gracefully handled by the specs
  244. |> (that asks for a 500ms timeout) and that is of course handled by trackdisk.device.
  245. a drive sometimes giving no dskrdy signal ? tackdisk device writing after
  246. 0.5 sec anyway ?
  247.  
  248. |> >Yes, A1200 are incomaptible, my cousins one is that incompatible
  249. |> 
  250. |> You are an idiot.
  251.  
  252. not. You will always find a category that makes 2 identical models
  253. incompatible. At least the different quarzes...
  254.  
  255. And for the drive story, no problem to use them to get code incompatible.
  256.  
  257. i=timer
  258. stepdrive
  259. waitfordskrdy
  260. i=timer-i
  261.  
  262. p=malloc(1024)
  263. for (n=0;n<i;n++)
  264.   *p++=0;
  265.  
  266. hehe, if dskrdy needs more than 1024 time units then the
  267. code will poke into unallocated memory.
  268.  
  269. voila incompatible vanilla A1200 ;)
  270.  
  271. |> 
  272. |> >|> It has been clear from the beginning. You do invalid assumptions and as
  273. |> >|> a result your code crashes.
  274. |> 
  275. |> >oh it does fine on my Kickstart revision.
  276. |> 
  277. |> THAT IS THE PROBLEM. YOU THINK IT WORKS WHEN IT WORKS FOR YOU.
  278.  
  279. no, you know that in this case it's all different.
  280.  
  281. |> 
  282. |> >As I assume loadview also makes use of copjmp2,
  283. |> 
  284. |> Sure. You always "assume".
  285.  
  286. No, but for the 3pass case I need to overtake copper because
  287. OS doesn't provide functions to get into ghost-mode.
  288.  
  289. |> 
  290. |> >If you can tell me how to CWAIT for x>222 if RKM says "this is illegal",
  291. |> >well, then I could switch to use static ucopls switched with loadview().
  292. |> 
  293. |> "The legal range of values is from 0 to 226".
  294.  
  295. "BUGS: User waiting for horizontal values of greater than 222 decimal
  296.  is illegal"
  297.  
  298. :)
  299.  
  300. Anyone got different numbers ? ;)
  301. I quote the v36 autodocs "third edition".
  302. has it increased to 226 in OS3.0 ? WOW! :D
  303.  
  304. You can imagine that x=226 wouldn't help much more ;)
  305.  
  306. |> 
  307. |> -- 
  308. |>                                 Michael van Elst
  309. |> 
  310. |> Internet: mlelstv@serpens.rhein.de
  311. |>                                 "A potential Snark may lurk in every tree."
  312. ------------------------------------------------------------------------
  313.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  314.  
  315.