jguff Posted November 16, 2017 Share Posted November 16, 2017 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 Quote Link to comment Share on other sites More sharing options...
VladR Posted November 16, 2017 Share Posted November 16, 2017 (edited) 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 November 16, 2017 by VladR 2 Quote Link to comment Share on other sites More sharing options...
VladR Posted November 16, 2017 Share Posted November 16, 2017 move.l #(YSIGNADD|XSIGNADD|XADDINC|WID224|ZOFFS0|PIXEL16|PITCH1),A1_FLAGS That's one helluva combo you are attempting there 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. 1 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 You can also try the retroarch version of virtual jaguar and see if that works any better for you. Quote Link to comment Share on other sites More sharing options...
VladR Posted November 16, 2017 Share Posted November 16, 2017 I checked the path to the examples from SDK, and on my PC it's: c:\jaguar\SOURCE\BLIT There's lots of Blitter code examples there with some good comments (and some very teeth-screeching / cheesy): - BLITBLCK.S - BLITLINE.S - BLITSHAD.S - CLEARBAR.S Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 16, 2017 Share Posted November 16, 2017 You can also try the retroarch version of virtual jaguar and see if that works any better for you. I see you have a new bone to chew on and not let go of. Are the RetroArch 'devs' you new messiah now all the others have failed? 2 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 I see you have a new bone to chew on and not let go of. Are the RetroArch 'devs' you new messiah now all the others have failed? REALLY? You don't think the guy has a right to know his options? Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 16, 2017 Share Posted November 16, 2017 REALLY? You don't think the guy has a right to know his options? Really? So his options are 'latest VJ' or 'older VJ with a skin on it' ? Did you not learn anything from the other thread? 2 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 16, 2017 Share Posted November 16, 2017 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? 2 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
+Sauron Posted November 16, 2017 Share Posted November 16, 2017 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. 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. 4 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 16, 2017 Share Posted November 16, 2017 Apologies to jguff for derailing, but didn't want you to be given incorrect or misleading information. Navigating around the Jaguar and BLiTTER is complex enough without wading through other people's delusions at the same time. 2 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
+Sauron Posted November 16, 2017 Share Posted November 16, 2017 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. 6 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 (edited) Shamus is the creator of VJ? Really? I wasn't aware of that. Learn something new everyday look at that. Edited November 16, 2017 by JagChris Quote Link to comment Share on other sites More sharing options...
+Sauron Posted November 16, 2017 Share Posted November 16, 2017 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. 3 Quote Link to comment Share on other sites More sharing options...
JagChris Posted November 16, 2017 Share Posted November 16, 2017 Virtual Jaguar is based on the source code that was released David Raingeard from his work on his own Jaguar Emulator, Potato Emulation. Much like RLn and SLN he's working off other people's work and renaming it. Quote Link to comment Share on other sites More sharing options...
Austin Posted November 16, 2017 Share Posted November 16, 2017 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. 2 Quote Link to comment Share on other sites More sharing options...
+Sauron Posted November 16, 2017 Share Posted November 16, 2017 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. 3 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted November 16, 2017 Share Posted November 16, 2017 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. 2 Quote Link to comment Share on other sites More sharing options...
Welshworrier Posted November 16, 2017 Share Posted November 16, 2017 Much like RLn and SLN he's working off other people's work and renaming it. I'm guessing how open source development works isn't your strong point. 6 Quote Link to comment Share on other sites More sharing options...
Shamus Posted November 16, 2017 Share Posted November 16, 2017 (edited) 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 November 16, 2017 by Shamus 1 Quote Link to comment Share on other sites More sharing options...
Shamus Posted November 16, 2017 Share Posted November 16, 2017 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! 6 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 16, 2017 Share Posted November 16, 2017 If you keep digging that hole, I'm sure you'll get to Oz in no time! Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.