06 September 2022, 23:38 | #341 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
sneaky
|
07 September 2022, 09:59 | #342 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 676
|
What these lines do is to stick the newly created Screen pointer into the WA_CustomScreen Tag in the window taglist. It lets the OS know that we want to open the window on this specific screen. So it seems the system doesn’t like our screens to open a window in?!
|
07 September 2022, 10:02 | #343 | |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,926
|
Quote:
Should I perhaps dig out my setup code for system-friendly 8bit screens with invisible input window, cleared mouse pointer etc? |
|
07 September 2022, 10:51 | #344 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,926
|
Some things I noticed: are you using a single BitMap structure and update the actual pointers in the structure when you do double buffering? (There are two Rasters allocated but I can only see one BitMap). I think I use two BitMap structures with fixed pointers each.
I would remove the WA_Flags tags. And I would use the corresponding tag for the empty custom mouse pointer instead of doing a separate call to SetPointer(). |
07 September 2022, 11:37 | #345 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,307
|
This is only necessary if you use an old OS version, i.e. OS 1. OS 3 is using current directory (as explained already) if you choose "" as path. OS 2 should also work but I'm not sure. Just check the docs or try it.
|
07 September 2022, 13:41 | #346 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
@grond
Do Please share anything you feel is relevant to the project |
07 September 2022, 19:26 | #347 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 676
|
Code:
Why the complicated address calculation when you only need to move the pointer to the slot after the corresponding tag? I would do something like "move.l d0,MainNewScreen" and be done with it. Code:
Some things I noticed: are you using a single BitMap structure and update the actual pointers in the structure when you do double buffering? Code:
; Flip screens move.l MainScreen,a1 lea sc_ViewPort(a1),a1 move.l a1,a0 move.l vp_RasInfo(a1),a1 move.l ri_BitMap(a1),a1 lea bm_Planes(a1),a1 moveq.l #7,d1 .putPlanePtr move.l d0,(a1)+ add.l #10240,d0 dbra d1,.putPlanePtr ; viewport still in a0 CALLGRAF ScrollVPort |
07 September 2022, 19:45 | #348 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 676
|
@Karlos, I really like those test levels. They really show the rendering artifacts. Especially the floor rendering looks appalling…. Desperately needs more precision and some rethinking on how to properly sample from the floor textures.
The inverted floor textures likely stem from a mismatch between the game‘s coordinate system ( x pointing right, z pointing away from the player) and the floor texture coordinate system. We could try to invert this mismatch at various places, but the easiest would probably be to flip the floor texture upside down upon loading. |
07 September 2022, 20:14 | #349 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,475
|
@pipper - due to work commitments they are all that I can manage in a lunch break. I'll get back to some actual software effort when it dies down.
Regarding the floors, unless we plan to have text on the floor textures (which you might have in places), I think that's a non issue really. We'd never have noticed it without specifically trying to see the size info. |
07 September 2022, 20:52 | #350 | |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,926
|
Quote:
This is code I have reused many times, perhaps it helps. It has quite some stuff that isn't necessary here but I erroneously posted a different (cut-down) version a few minutes ago that didn't have all the features I thought it had. Thus, I just keep this one as it is, I bet you can cut out the unneeded stuff easily. Code:
* install * * opens a screen and sets palette * uninstall * * closes the screen machine 68020 xdef setup xdef time1 xdef time2 xdef cleanup xdef chipout xdef do_dblbuf xdef fastbuffer xdef workbuffer incdir "include:" include "lvo/exec_lvo.i" include "lvo/intuition_lvo.i" include "lvo/graphics_lvo.i" include "lvo/timer_lvo.i" include "exec/memory.i" include "exec/interrupts.i" include "hardware/intbits.i" include "intuition/screens.i" include "graphics/modeid.i" include "graphics/gfx.i" include "devices/timer.i" include "intuition/pointerclass.i" WIDTH equ 320 HEIGHT equ 256 DEPTH equ 6 CHIPSIZE equ WIDTH*HEIGHT*DEPTH/8 PLANE equ CHIPSIZE/DEPTH FASTSIZE equ WIDTH*HEIGHT ******************************************************************************** setup: movem.l d1-a6,-(sp) ; store interrupt parameters to interrupt struct move.l a0,vbis_Data move.l a1,vbis_Code move.l 4,a6 move.l #INTB_VERTB,d0 lea struct_int,a1 jsr _LVOAddIntServer(a6) lea timername,a0 lea timerrequest,a1 moveq #0,d0 moveq #0,d1 jsr _LVOOpenDevice(a6) move.l timerrequest+IO_DEVICE,timerbase move.l d0,timerflag bne error_exit moveq #39,d0 lea intlib,a1 jsr _LVOOpenLibrary(a6) move.l d0,intbase beq error_exit moveq #39,d0 lea gfxlib,a1 jsr _LVOOpenLibrary(a6) move.l d0,gfxbase beq error_exit move.l gfxbase,a6 moveq #-1,d0 jsr _LVOSetChipRev(a6) lea bestidtags,a0 jsr _LVOBestModeIDA(a6) move.l d0,idtag beq error_exit move.l 4,a6 move.l #FASTSIZE,d0 move.l #MEMF_FAST|MEMF_CLEAR,d1 jsr _LVOAllocVec(a6) move.l d0,fastbuffer beq error_exit move.l gfxbase,a6 move.l #WIDTH,d0 move.l #HEIGHT,d1 move.l #DEPTH,d2 ; move.l #BMF_CLEAR|BMF_INTERLEAVED|BMF_DISPLAYABLE,d3 move.l #BMF_CLEAR|BMF_DISPLAYABLE,d3 sub.l a0,a0 jsr _LVOAllocBitMap(a6) move.l d0,bitmap1 beq error_exit move.l d0,scrbm ; test bitmap properties move.l d0,a0 cmpi.w #WIDTH/8,bm_BytesPerRow(a0) bne error_exit cmpi.w #HEIGHT,bm_Rows(a0) bne error_exit move.l #WIDTH/8*HEIGHT,d0 lea bm_Planes(a0),a0 moveq #DEPTH-2,d2 .loop1 move.l 4(a0),d1 sub.l (a0)+,d1 cmp.l d0,d1 bne error_exit dbra d2,.loop1 move.l #WIDTH,d0 move.l #HEIGHT,d1 move.l #DEPTH,d2 ; move.l #BMF_CLEAR|BMF_INTERLEAVED|BMF_DISPLAYABLE,d3 move.l #BMF_CLEAR|BMF_DISPLAYABLE,d3 sub.l a0,a0 jsr _LVOAllocBitMap(a6) move.l d0,bitmap2 beq error_exit ; test bitmap properties move.l d0,a0 cmpi.w #WIDTH/8,bm_BytesPerRow(a0) bne error_exit cmpi.w #HEIGHT,bm_Rows(a0) bne error_exit move.l #WIDTH/8*HEIGHT,d0 lea bm_Planes(a0),a0 moveq #DEPTH-2,d2 .loop2 move.l 4(a0),d1 sub.l (a0)+,d1 cmp.l d0,d1 bne error_exit dbra d2,.loop2 move.l intbase,a6 sub.l a0,a0 lea screentags,a1 jsr _LVOOpenScreenTagList(a6) move.l d0,myscreen beq error_exit move.l d0,a0 move.l bitmap1,a1 moveq #0,d0 jsr _LVOAllocScreenBuffer(a6) move.l d0,screenbuf1 beq error_exit move.l d0,nextscrbuf move.l d0,a0 move.l sb_BitMap(a0),a0 move.l bm_Planes(a0),a0 move.l a0,chipout move.l myscreen,a0 move.l bitmap2,a1 moveq #0,d0 jsr _LVOAllocScreenBuffer(a6) move.l d0,screenbuf2 beq error_exit move.l gfxbase,a6 move.l #16,d0 ;xsize move.l #1,d1 ;ysize move.l #2,d2 ;depth move.l #BMF_CLEAR|BMF_DISPLAYABLE,d3 ;flags sub.l a0,a0 ;FriendBitMap jsr _LVOAllocBitMap(a6) move.l d0,mysprbm1 beq error_exit move.l intbase,a6 sub.l a0,a0 lea pointerclass,a1 lea pointertags,a2 jsr _LVONewObjectA(a6) move.l d0,pointerobject beq error_exit move.l intbase,a6 sub.l a0,a0 lea windowtags,a1 jsr _LVOOpenWindowTagList(a6) move.l d0,mywindow beq error_exit moveq #0,d0 movem.l (sp)+,d1-a6 rts error_exit: moveq #-1,d0 movem.l (sp)+,d1-a6 rts ******************************************************************************** do_dblbuf: move.l a6,-(sp) move.l intbase,a6 move.l myscreen,a0 move.l nextscrbuf,a1 jsr _LVOChangeScreenBuffer(a6) move.l framecount,d0 addq.l #1,d0 move.l d0,framecount btst #0,d0 beq .oddframe move.l screenbuf1,a0 move.l a0,nextscrbuf bra .endif .oddframe: move.l screenbuf2,a0 move.l a0,nextscrbuf .endif: move.l sb_BitMap(a0),a0 move.l bm_Planes(a0),a0 move.l a0,chipout move.l (sp)+,a6 rts ******************************************************************************** time1: move.l a6,-(sp) move.l timerbase,a6 lea first,a0 jsr _LVOReadEClock(a6) move.l (sp)+,a6 rts ******************************************************************************** time2: movem.l d2/a2/a6,-(sp) move.l timerbase,a6 lea second,a0 jsr _LVOReadEClock(a6) move.l d0,d2 lea second,a0 lea first,a1 jsr _LVOSubTime(a6) ; average: move.l lasttime,d1 bne .skip add.l 4(a0),d1 .skip: add.l 4(a0),d1 asr.l #1,d1 move.l d1,lasttime move.l d2,d0 mulu.l #1000,d0 divu.l d1,d0 lea outputstring,a0 move.l #10000,d1 divu.w d1,d0 move.b d0,d2 beq .leadingzero add.b #"0",d2 ; convert to ASCII move.b d2,(a0)+ bra .next .leadingzero: move.b #" ",(a0)+ .next: sub.w d0,d0 swap d0 divu.w #10,d1 divu.w d1,d0 move.b d0,d2 add.b #"0",d2 ; convert to ASCII move.b d2,(a0)+ move.b #",",(a0)+ sub.w d0,d0 swap d0 divu.w #10,d1 divu.w d1,d0 move.b d0,d2 add.b #"0",d2 ; convert to ASCII move.b d2,(a0)+ sub.w d0,d0 swap d0 divu.w #10,d1 divu.w d1,d0 move.b d0,d2 add.b #"0",d2 ; convert to ASCII move.b d2,(a0)+ move.l #" fps",(a0)+ ; move.b #" ",(a0) move.l gfxbase,a6 move.l myscreen,a0 lea sc_RastPort(a0),a1 lea sc_ViewPort(a0),a0 move.l vp_RasInfo(a0),a0 move.w ri_RyOffset(a0),d1 move.l a1,a2 clr.l d0 add.w #10,d1 ext.l d1 jsr _LVOMove(a6) lea outputstring,a0 move.l a2,a1 moveq #9,d0 jsr _LVOText(a6) movem.l (sp)+,d2/a2/a6 rts ******************************************************************************** cleanup: movem.l d0-a6,-(sp) move.l 4,a6 move.l #INTB_VERTB,d0 lea struct_int,a1 jsr _LVORemIntServer(a6) tst.l timerflag bne .skip1 lea timerrequest,a1 jsr _LVOCloseDevice(a6) .skip1: move.l intbase,d0 beq .skip2 move.l d0,a6 move.l pointerobject,d0 beq .skip2 move.l d0,a0 jsr _LVODisposeObject(a6) .skip2: move.l gfxbase,d0 beq .skip3 move.l d0,a6 move.l mysprbm1,d0 beq .skip3 move.l d0,a0 jsr _LVOFreeBitMap(a6) .skip3: move.l intbase,d0 beq .skip4 move.l d0,a6 move.l mywindow,d0 beq .skip4 move.l d0,a0 jsr _LVOCloseWindow(a6) .skip4: move.l intbase,d0 beq .skip5 move.l d0,a6 move.l myscreen,d0 beq .skip5 move.l d0,a0 move.l screenbuf1,d0 beq .skip5 move.l d0,a1 jsr _LVOFreeScreenBuffer(a6) .skip5: move.l intbase,d0 beq .skip6 move.l d0,a6 move.l myscreen,d0 beq .skip6 move.l d0,a0 move.l screenbuf2,d0 beq .skip6 move.l d0,a1 jsr _LVOFreeScreenBuffer(a6) .skip6: move.l intbase,d0 beq .skip7 move.l d0,a6 move.l myscreen,d0 beq .skip7 move.l d0,a0 jsr _LVOCloseScreen(a6) .skip7: move.l gfxbase,d0 beq .skip8 move.l d0,a6 move.l bitmap1,d0 beq .skip8 move.l d0,a0 jsr _LVOFreeBitMap(a6) .skip8: move.l gfxbase,d0 beq .skip9 move.l d0,a6 move.l bitmap2,d0 beq .skip9 move.l d0,a0 jsr _LVOFreeBitMap(a6) .skip9: move.l 4,a6 move.l gfxbase,d0 beq .skip10 move.l d0,a1 jsr _LVOCloseLibrary(a6) .skip10: move.l intbase,d0 beq .skip11 move.l d0,a1 jsr _LVOCloseLibrary(a6) .skip11: move.l fastbuffer,d0 beq .skip12 move.l d0,a1 jsr _LVOFreeVec(a6) .skip12: movem.l (sp)+,d0-a6 rts ******************************************************************************** diminfo: ds.b dim_SIZEOF bitmap1: dc.l 0 bitmap2: dc.l 0 chipout: dc.l 0 nextscrbuf: dc.l 0 screenbuf1: dc.l 0 screenbuf2: dc.l 0 framecount: dc.l 0 fastbuffer: dc.l 0 intbase: dc.l 0 gfxbase: dc.l 0 timerbase: dc.l 0 timerflag: dc.l -1 first: dc.l 0,0 second: dc.l 0,0 lasttime: dc.l 0 mywindow: dc.l 0 struct_int: vbis_Succ: dc.l 0 vbis_Pred: dc.l 0 vbis_Type: dc.b NT_INTERRUPT vbis_Pri: dc.b -127 vbis_Name: dc.l 0 vbis_Data: dc.l 0 vbis_Code: dc.l 0 timerrequest: ds.b IOTV_SIZE timername: dc.b "timer.device",0 outputstring: dcb.b 10 intlib: dc.b "intuition.library",0 gfxlib: dc.b "graphics.library",0 pointerclass: dc.b "pointerclass",0 cnop 0,4 screentags: dc.l SA_Left,0,SA_Top,0,SA_Width,WIDTH,SA_Height,HEIGHT,SA_DisplayID idtag: dc.l 0,SA_BitMap scrbm: dc.l 0 dc.l SA_Type,CUSTOMSCREEN,SA_Quiet,1 dc.l SA_Colors32,palette,SA_Draggable,0,TAG_END bestidtags: dc.l BIDTAG_NominalWidth,WIDTH,BIDTAG_NominalHeight,HEIGHT,BIDTAG_Depth,DEPTH dc.l BIDTAG_DIPFMustHave,DIPF_IS_EXTRAHALFBRITE,TAG_END windowtags: dc.l WA_Left,0,WA_Top,0,WA_Width,WIDTH,WA_Height,HEIGHT dc.l WA_IDCMP,IDCMP_VANILLAKEY,WA_CustomScreen myscreen: dc.l 0,WA_Borderless,1,WA_Activate,1,WA_Backdrop,1,WA_RMBTrap,1 dc.l WA_Pointer pointerobject: dc.l 0 dc.l TAG_END pointertags: dc.l POINTERA_BitMap mysprbm1: dc.l 0 dc.l POINTERA_WordWidth,1,TAG_END palette: incdir "." include "palette.i" Last edited by grond; 09 September 2022 at 09:52. |
|
07 September 2022, 21:44 | #351 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,475
|
@pipper
Just one more thing (Columbo mode) on the floor sampling. Each zone has a scale factor for the flat textures, where 0 is the default, each successive negative number magnifies by a factor or 2 and each successive positive number reduces by a power of two. I think, at least subjectivity looking at the outputs that the errors in the sampling get magnified, which likely suggests some sequence of fixed point operations that could be reordered to reduce the sampling error. I will have to make an area to test that idea |
07 September 2022, 22:13 | #352 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
so shoe horned some of the pointer/window handling from Grond into the menunb.s and screensetup.s and it works for me in ks3.1
changes and an executable in attached .zip thanks Grond edit: also had to add 'include intuition/pointerclass.i' to system.i Last edited by abu_the_monkey; 15 September 2022 at 01:01. |
07 September 2022, 23:28 | #353 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,475
|
@abu_the_monkey
Have you checked this in UAE without any memory at $10000000 (i.e. the 32-bit chip ram) ? |
07 September 2022, 23:35 | #354 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,926
|
Glad I could help! I always liked how far you could get with AmigaOS without killing the OS. In my opinion people that always kill the system first are rather ignorant.
|
07 September 2022, 23:45 | #355 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
@Karlos
yes. just a plain 3.1 install ks3.1 040 2mb chip and 64mb z3 fast. there is a glitch when exiting a game back to menu, the scrolling background is out of whack but other than that seems ok. @Grond nice one |
08 September 2022, 00:38 | #356 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 676
|
For shutting down the OS to a bare minimum there's also lowlevel.library's "SystemControlA" function. Maybe one day this could be used. But the hardware we target should be capable of leaving the OS alive.
http://amigadev.elowar.com/read/ADCD.../node046F.html I'll try tonight and see if I can incorporate some of Grond's code. In particular the mousepointer code. This way I can skip creating a window altogether. The issues with this executable are getting weirder and weirder. In my minimal-3.1 WinUAE setup the latest executable runs just fine. But when I switch to a setup closer to my real machine (Blizzard 1230-IV plus memory, Blizkicks and other patches) and kickstart 3.1 it refuses to start or it gets into the main menu but then crashes when actually attempting to play the game. |
08 September 2022, 00:57 | #357 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
Some of the issues could be caused by me hacking bits in/out I guess, if you are referring to the executable I posted.
So yeah, probably needs someone with a better understanding to go over it and work their magic edit: I have just tested (not extensively obviously) the executable I posted with winuae, emulated blizzard 1230-IV, 4mb fast mem, no patches just maprom and it seems to run ok. (the menu is plain i.e. no fire or scrolling backdrop as I had commented them out but have tested with them back in and it seems the same) Last edited by abu_the_monkey; 08 September 2022 at 01:32. |
08 September 2022, 01:44 | #358 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
|
I think you will still have to open a window as that is when the WA_Pointer tag gets used, or am i reading things wrong as per usual?
|
08 September 2022, 07:09 | #359 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,926
|
|
08 September 2022, 13:49 | #360 |
Amiga Games Database
Join Date: Jun 2006
Location: South West England
Posts: 1,288
|
I tried the pipper_HiRes and the Grond Hires exes on my 1200 Blizzard 1260 system:
Pipper's behaved the same as the earlier one, black screen, locked up, and my WB mouse pointer left visible. The Grond one behaved the same, except the mouse pointer could not be seen. Incidentally, I usually run Newmode, but have been disabling it with this TKG project, however when I keep it in place and run any of these TKG exes, the freeze happens on workbench as soon as the Newmode prefs window opens, not allowing me to select anything. Don't know if that is indicative of anything useful. Oh, I assume the 2 other files (screen and menu .s files) just get placed in the main game directory with the exe? I couldn't find files with similar names to replace. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alien Breed 3D II The Killing Grounds RTG patch | Angus | Retrogaming General Discussion | 63 | 14 December 2022 15:20 |
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors | Ian | support.WinUAE | 16 | 23 December 2016 15:50 |
Alien Breed 3D II : The Killing Grounds code booklet | alexh | support.Games | 19 | 10 October 2012 22:17 |
Alien Breed 3D 2 - The Killing Grounds | Ironclaw | support.Games | 12 | 13 September 2005 13:07 |
HD Version of Alien Breed I ? | Kintaro | request.Old Rare Games | 20 | 31 July 2003 10:48 |
|
|