Jump to content
IGNORED

Blitter and 68000


jguff

Recommended Posts

Anyone ever have problems writing to blitter registers, using 68000?

Is there a known bug in Virtual Jaguar? Virtual Jaguar crashes on a number of commercial ROMS for me.

 

When i tried writing value1 to A1_STEP register, Virtual Jaguar would not show anything written to F02204.

When i wrote value2 to A1_PIXEL register, Virtual Jaguar would then show value2 written to F02204 AND F0220C.

 

I read some documentation suggesting not writing to the Tom registers using 68000 (due to bugs), and thought perhaps that was the issue.

I'm fairly certain that when i fooled around with BJL 15-20 years ago, that i blitted code into GPU, then used GPU to instruct blitter to perform a line draw.

 

It looks like there is some example code of others using 68000 to setup blitter to perform a contiguous memory copy or single horizontal line draw.

Believe i saw an example where only A1_BASE, A2_BASE, B_COUNT, and B_CMD were set to do a contiguous memory blit. I thought i would try the same, blitting a line into a 68000 created bitmap, to prove i could do a contigous memory blit. Once that test worked, try blitting gpu code into GPU RAM space. Then try using GPU to set blitter registers, and see if that helped.

 

I seem to be unable to do even the contiguous memory blit, via 68000 setup, though. Virtual Jaguar becomes unresponsive every time i set the B_CMD register using 68000.

 

I've attached source code. Blitting begins at checkBlitter label. I commented out the B_CMD set, so that someone can run this and see bitmap being displayed by Object Processor. If B_CMD were set, and blit were to succeed, a line of pixels should show up in the bitmap.

 

Any help/insight would be appreciated,

 

Bob

 

 

test.s

JAGUAR.INC

build.txt

Link to comment
Share on other sites

You can definitely drive Blitter from 68k safely. If you look at the following link, it's all OP&Blitter from 68k (and from C, actually, not even ASM) https://www.youtube.com/watch?v=RXKBj9uNj08

 

Last time I was testing VJ was about 2-3 years ago, and that particular build of VJ, Blitter worked just fine - but I also clearly recall trying one of the later VJ builds, and blitter didn't work there, so I reverted back to the older VJ build - so experiment a bit with different builds, if you don't have access to the jag.

 

Also, check the Atari's code examples - there's lots of examples with working combination of Blitter flags, which BTW are crucial to get right ALL at the same time, since you'll be lucky to get a garbage blit if even one flag is wrong. That means:

 

For A1_Flags:

-pitch

-pixel depth

-OP bitmap width

-Phrase/Pixel Mode

 

For B_COUNT:

- Hi Word:yl, LoWord: xl

 

For A1_STEP:

- proper computed value as per docs

 

For B_CMD:

- you really want the smallest possible amount of flags here

 

Here's my version of Clearing the Screen via phrase (feel free to try the XADDPIX one too) Blitting (works on real HW across all resolutions):

EDIT: constants:
OP_WIDTH        .EQU WID768
ScrWidth        .equ 768
ScrHeight       .equ 200

vidmem : register containing ptr to framebuffer

ClearScreen:
	.csYL	.equ ScrHeight
	.csXL	.equ ScrWidth
	SetValueR A1_BASE,	vidmem
	SetValue A1_FLAGS,	PITCH1|PIXEL8|OP_WIDTH|XADDPHR
;	SetValue A1_FLAGS,	PITCH1|PIXEL8|OP_WIDTH|XADDPIX
	SetValue A1_PIXEL,	0
	SetValue B_PATD,	0
	SetValue B_PATD+4,	0
	SetValue B_COUNT,	(.csYL << 16) | .csXL
	SetValue A1_STEP,	$10000 + (65536 - .csXL)
	SetValue B_CMD, 	PATDSEL | UPDA1
	;wait
	Return

Of course, if you don't want to loose hair why randomly every now and then there's a corrupted blit, I recommend to .phrase align every single bitmap label. You might get lucky initially, but eventually the alignment will go off and even though it's a different segment than code, it doesn't matter in the end.

Edited by VladR
  • Like 2
Link to comment
Share on other sites

 

move.l #(YSIGNADD|XSIGNADD|XADDINC|WID224|ZOFFS0|PIXEL16|PITCH1),A1_FLAGS

That's one helluva combo you are attempting there :D

Also some invalid combinations. You must start with the smallest amount of flags needed, and then, one by one, check for dependencies (and behavior) against other registers (that alone takes quite some time to verify for the first time).

 

Not sure if you got this already, but the best online Blitter info repository is this:

https://www.mulle-kybernetik.com/jagdox/blitter.html

 

Makes for a good morning coffee read. For few days :)

 

Try to use my routine - change the B_PATD and B_PATD+4 to some big values, so you'll see an 8-pixel pattern being repeated. Looks like you're in CRY16, so need to change PIXEL8 too. And adjust WID768 to whatever resolution you are using.

  • Like 1
Link to comment
Share on other sites

That revier said retroarch works better. Is actively worked on. If you have better info than go correct him. Prove.him.wrong.

 

The fact that you're trying to make those out there believe you just cuz you say so...'didnt you learn anything last thread'. Gotta be kidding me. Get outta here.

Link to comment
Share on other sites

That revier said retroarch works better. Is actively worked on. If you have better info than go correct him. Prove.him.wrong.

 

The fact that you're trying to make those out there believe you just cuz you say so...'didnt you learn anything last thread'. Gotta be kidding me. Get outta here.

 

No, it's called fact. But whatever dude... carry on spreading misinformation wherever you go :)

As for 'get outta here' - this is the programming section. What have you contributed?

  • Like 2
Link to comment
Share on other sites

All I said in this thread was that according to that reviewer Retroarch was branching off with Virtual Jaguar. The only way those are my words that they are updating it and actively working on it is because that's what the reviewer stated

 

I just pointed that out. All those claims that you say I said as misinformation I'm just telling you what that reviewer said. And then I said people can go find out on their own on their own whether that Reviewer is full of crap or you guys are.

 

Now people are going to go and try this now. And if you Reboot guys claims are false compared to the what that guy is saying on that video you guys are going to come off foolish. Disingenuous. Silly.

Link to comment
Share on other sites

All I said in this thread was that according to that reviewer Retroarch was branching off with Virtual Jaguar. The only way those are my words that they are updating it and actively working on it is because that's what the reviewer stated

 

I just pointed that out. All those claims that you say I said as misinformation I'm just telling you what that reviewer said. And then I said people can go find out on their own on their own whether that Reviewer is full of crap or you guys are.

 

Now people are going to go and try this now. And if you Reboot guys claims are false compared to the what that guy is saying on that video you guys are going to come off foolish. Disingenuous. Silly.

 

You're certainly not the brightest bulb in the lamp.

 

http://atariage.com/forums/topic/264464-virtual-jaguar-project-tempest-compatibility-list/?p=3788655

 

 

Retroarch basically takes Virtual Jaguar as-is from my repo, so there's nothing new there (N.B.: any VJ archives on Github are not mine, and not affiliated with me in any way--I do not do Github for projects I control). I would not expect any improvements to come those guys.

And I find it so funny that this guy is slagging off VJ when that's what's at the heart of Retroarch. Cluelessness abounds. :D

 

 

 

Of course VJ is open source, but I'd say the chances that they made improvements are slim to none They're pulling sources from my GIT repo after all. And Cybermorph & FFL in the latest GIT works if you enable the BIOS (the demos at least, I haven't tried playing them).

 

Regardless of what "Reboot" says, I'd say that the developer of VJ is pretty authorative on matters of VJ.

  • Like 4
Link to comment
Share on other sites

 

You're certainly not the brightest bulb in the lamp.

 

http://atariage.com/forums/topic/264464-virtual-jaguar-project-tempest-compatibility-list/?p=3788655

 

 

 

Regardless of what "Reboot" says, I'd say that the developer of VJ is pretty authorative on matters of VJ.

This is like watching one of those evangelists quoting the Bible to try and prove the Bible is real.

 

Anyways whatever.

Link to comment
Share on other sites

This is like watching one of those evangelists quoting the Bible to try and prove the Bible is real.

 

Anyways whatever.

 

VJ = Creation

Shamus = Creator

Quote from Shamus = Direct words of Creator, not a paraphrasing written 100+ years after the fact of what the author THINKS Creator said.

 

Keep doubling down on this all you want, it's not going to make you right.

  • Like 6
Link to comment
Share on other sites

Shamus is the creator of VJ? Really? I wasn't aware of that. Learn something new everyday look at that.

 

Your successful attempts at making yourself look like an idiot are derailing this thread. If you wish to continue doing so, at least find the appropriate thread to do this, such as one of the threads about VJ and Retroarch.

  • Like 3
Link to comment
Share on other sites

 

Your successful attempts at making yourself look like an idiot are derailing this thread. If you wish to continue doing so, at least find the appropriate thread to do this, such as one of the threads about VJ and Retroarch.

 

It's making for somewhat quality entertainment at 3AM, at least.

  • Like 2
Link to comment
Share on other sites

Much like RLn and SLN he's working off other people's work and renaming it.

 

In open source it's called "forking", and hardly matters when it's open source. But again...keep making yourself look like an idiot IN ANOTHER THREAD.

  • Like 3
Link to comment
Share on other sites

Much like RLn and SLN he's working off other people's work and renaming it.

Just my 2p.. but SLN is based on ALN source, RLN is also based on ALN source.. and RLN actually credits the original author (Landon), and has been worked on more recently than SLN (last I checked/ submitted a patch).. The same is true of RMAC too.

 

 

Further to the Blitter discussion.. it has been a very very VERY long time since I poked at it, but I did so from the 68K. I had a call that zero'd out all the registers before I programmed it. Using move.l #0,<BLITTER REGISTER> not cls.l .. IIRC after running it once I then called the clear again and reprogrammed etc etc. I think stuff was sometimes left in registers possibly ones I hadn't set and this could cause weird or broken behaviour on subsequent runs.

 

It's not ideal, but might be worth a try to see if it helps whilst you are poking at it to get started.

  • Like 2
Link to comment
Share on other sites

Anyone ever have problems writing to blitter registers, using 68000?

Is there a known bug in Virtual Jaguar? Virtual Jaguar crashes on a number of commercial ROMS for me.

 

I seem to be unable to do even the contiguous memory blit, via 68000 setup, though. Virtual Jaguar becomes unresponsive every time i set the B_CMD register using 68000.

 

Any help/insight would be appreciated,

 

Writing to the blitter with the 68K is certainly possible and I and others have used that technique successfully. I would encourage you to get hold of the JTRM done by John Mathieson and read the section on the blitter, as the blitter is a very complex piece of hardware that most of the time will not do what you expect of it if you don't understand all the bits that go with it. If you can't find a copy, let me know and I'll post it here.

 

Which version of VJ are you using? Writing to B_CMD should not cause VJ to be unresponsive and if it is, that's a bug in VJ and not the Jaguar hardware. Have you tried the "Fast Blitter" option, to see if that works any better for you? Have you tried running it in Alpine mode to see what's happening with the emulated hardware?

Edited by Shamus
  • Like 1
Link to comment
Share on other sites

Much like RLn and SLN he's working off other people's work and renaming it.

 

Unlike the Retroarch guys, I fully believe in giving credit where credit is due, and not pretending like it's something other than what it is. If you look at the sources for RMAC and RLN (which I highly doubt you can be bothered to do), you would see and understand this.

 

I did not take SMAC/SLN (which, let's be clear, were created from MAC and ALN sources) and make minimal cosmetic changes to it and announce to the world + dog that here was something entirely new to the world and aren't I great for having created this new thing; I forked it and gave it a new name in the same spirit that SubQMod did with MAC and ALN.

 

Also unlike the Retroarch guys, I and others have actively gone through the codebase and improved it and fixed many bugs with it and added capabilities to it that SMAC/SLN never had (I am not going to list them here as they are already listed in the GIT log for each project). If you compare the codebases (again, I doubt you can be bothered to do any such thing) you would find that they have diverged quite a bit and thus RMAC and RLN are pretty much their own things now.

 

So, in sum, the Retroarch guys are a bunch of parasites who contribute nothing back to the codebases they use and get their glory from and give no credit to the authors whose works they use as a basis for their little frontend kingdom; while I and the others who help me are busy writing and improving on the things we have inherited. Don't compare us with them, we are not even remotely similar.

 

But please, keep spouting off about things you don't understand. If you keep digging that hole, I'm sure you'll get to Oz in no time! :D

  • Like 6
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...