|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
![]() |
Goto page 1, 2 Next |
Rate this entry!
This poll has expired.
|
||||||||||||||||||||||||||||
Author | Message | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Coding competition 2017] Bad Apple by Psidum, Calindro, RushJet1, Sim
![]() |
|||||||||||||||||||||||||||
http://www.smspower.org/Homebrew/BadAppleForSMS-SMS
![]() ![]()
|
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Here's a link to a YouTube recording of this entry. | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I just watched the video on my morning commute, and think that I might have wetted my pants out of pure happiness!! Fantastic job guys. I have dreamt of this since discovering the Mega Drive version. And I thought Bad Apple required blast processing :) | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Impressive video. This night have to test ot on emulator. Ill check the time-size relation. Vould be inyereating for intros. | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Amazing work guys!!!
(Not to mention this time you could also spell my nickname correctly! :D ) A few technical questions: are you updating audio at 50 Hz or at a higher rate? How much space is the audio part taking in the ROM? (I suspect it's not a small part as PSG format is very demanding in terms of ROM space). And it's using both slot 1 and slot 2 (SEGA mapper) paging, isn't it? |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Amazing stuff. It's practically perfect. Love what you did with the music. The bass in particular is awesome. | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Excellent stuff! | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Cheers for the video rushjet. What can I say about this? I'm frikking gobsmacked!!! It's superb!! What an amazing feature on the master system and will leave many thinking is this for real?? Super impressive work both visually and sound is brilliant. That heavy bass part sounds like there's some pulse width modulation and all ! Congratulations guys , really awesome. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Heh, I'd be happy with just the RushJet1 music but 25fps 2-bit video is great too. The NES versions are blown away, the video seems very close to the Mega Drive version as intended although it often seems to err on the side of 1-bit edges?
Maybe this will be the end of Bad Apple for SMS, I think it's pretty much done now... |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
This looks great! Super smooth and the PSG soundtrack works very well!
Is seems to be a totally different approach than mine looking at the way it uses VRAM. Look forward to try it on my SMS :) |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Had to check that nes version and what a difference! Nes is way more pixelized and the master system is so smooth! |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Hi.
@Sverx - The audio is 50hz, we talked about higher frequencies but it was not possible. It was a bit of a nightmare to get a call each frame due to stack abuse. The audio is 12K compressed. Both slot 1 and 2 are swapped around using sega mapper (well technically not sega mapper since they never used full 8 bit). @Maxim - The sharper edges were intended. Taking it down to sms resolution and 2 grays the edges were very noisy. @Gligli - Yes we came at this from very different directions. I was really happy to see your updated version. I feel your approach was far more conventional and I learned things from your discussion on forums. Thankyou for the many kind words! I am very busy right now but hope to do a write up on how this is working, the challenges we had to over come. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I figured the grey edges would have made it blurrier and also take a lot more ROM space :) | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Both Bad Apples are quite nice achievements on their own way. ;) | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() Last edited by psidum on Thu Mar 30, 2017 1:35 am; edited 1 time in total |
|||||||||||||||||||||||||||
The grey situation is pretty size neutral. For the sharpened image there is about 220,000 unique tiles after flips and invert reduced down to around 60,000 after initial tile crunch.
Then there is additional reduction as some frames have too many unique tiles for vram, some segments require streamed tiles at a rate beyond bandwidth thresholds and other things. Parser kicks and and applies compression dynamically. Without sharper edges the original tile count is higher but the effects of compression are less noticeable so you can push the total number down to a similar level. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Some people have been asking why it does not work on Megadrive / Genesis hardware. I have no idea how explain in layman terms so I will give a technical one and let others clarify. There is around 8MB of uncompressed nametable data alone that need to fit on the ROM.
Size might seam like the big issue (and it is a big issue) but bandwidth / processing power is by far the biggest issue for 25 fps. Standard approach is to have nametable buffer and alternate frame by frame but this takes up valuable vram. Most of the time spent on this project was developing a solution that could get nametable updates done in a single vblank removing need for buffer. An uncompressed nametable takes pretty much a full PAL vblank to write to vdp so doing it in the same time with a strong compression is not simple. The solution is multifaceted... - Temporal compression, focusing only on nametable changes between frames. - Difference is broken down in to rectangles similar to this discussion, http://stackoverflow.com/questions/5919298/algorithm-for-finding-the-fewest-rect... - Bias is introduced for width over height. A rectangle is a series of sequential nametable writes the total number determined by height. The VDP pointer needs to be adjusted if/when we need to write next row of data. To do this we need 4 registers + a 16 bit calculation + resetting the vdp pointer. Not only is this very slow but it takes up registers which are so valuable (stack is being used for reading data and z80 is otherwise very slow working with ram). Instead what we do is store only the low byte of original address, for each new line add 63 and set as low byte of vdp address, read data byte to latch full address and push over potential 256 boundary. This came about after hours of pulling my hair out over not having enough registers to make it work. Unintuitively its also faster which was a surprise. There is obviously quite a lot more going on with the nametable solution but this is why the rom is incompatible with genesis hardware. It simply would not have been possible to get the nametables written fast enough without using this technique. A similar technique is also used to speed up streaming of tiles. Having a single nametable frees up VRAM for better picture quality, more flexibility with front-loading tiles for high bandwidth sections, etc. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Wow, it seemed to me it was updating faster. Great work tracking that from scratch (SnevenTracker?) and I'm also wondering how it could fit 12 KB... well, there's quite a lot of self-similarity in the tune so it's probably that. I'm also curious to know if you removed the SFX support from PSGlib's PSGFrame function... that would make it way faster as you won't need to store volumes/tones in RAM nor to check if channel 2 or 3 is allocated to SFX... you might save very valuable time :) Also, I read your post about the reason why it doesn't work on the MegaDrive VDP in SMS mode... but I don't get it. :| Is it that this ->
... doesn't work on MD? |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Yes that is the incompatibility. MD expects command words to be 16bit.
The solution is not dissimilar to the more commonly used HL, manipulate L for quick navigation within a 256 boundary of data in general z80 programming except here we can push in to next 256 boundary by setting L to 255 and reading a byte to auto increment H, or in this case VDP pointer. If you hold up + both buttons on incompatibility screen it will run the rom anyway regardless of incompatibilities. Concat the rom to 1MB and you can see the first min or so of video on you everdrives, even in NTSC (it will be faster). |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Side by side comparison with Mega Drive and NES. | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Wow! Wow! WOW! how smooth animation here. I suppose the palette wild reduction lets to do things like this. Also, very good music arrangement. Remember the dos demoscene years. Well done! | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Hi
Here is the rom source for project. The original video code was written around this time last year and saw various updates over the course of the year. The code for animation is in /libraries/graphlib.inc. I didn’t bother cleaning up other code since its just displaying images and fades. The encoder is not in a state fit for human consumption right now. Some additional info…
- Originally intended to be black and white (1 bitplane) and fit in 1MB. Became apparent this goal was not possible without major rework so switched to grey scale (2 bitplane) and 4MB. - Performance issues associated with 2 bitplane graphics forced us to revert tilestream code back to incompatible version breaking MD / Genesis compatibility yet again. - Decompressor uses stack for performance gains. Can take between 1 to 3 vdp frames to decode 1 video frame. Its very rarely 3. Decompressor pads additional vdp frame when only one frame is used to keep in sync. - PSGlib is called 50 fps. During tile streaming interrupts are turned off on z80 but left on on VDP. Control port is periodically polled to check for required PSGlib calls. Everyone was busy when this was released. Should have given additional thanks to the following people.
Efry: Author of Z80Editor dev environment + support and encouragement. Kagesan: Support and encouragement. Maxim: Technical documentation. Modified aplib code used for images. Charles McDonald: Technical documentation writer extraordinaire! Everyone at SMS Power for making the SMS Dev scene the great scene it is! |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Cunning! :) BTW, did you strip the unused features from PSGlib (to make it faster) or did you use it out-of-the-box? A stripped down PSGlib version would be much faster (I'm thinking about having no checks for SFX, no volume attenuation and so on...). I can make such a version, if you need it :) |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
It uses the full library. I have been meaning to strip it back, I think it would be good to put out there. | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
PSG_lib "minimalistic" - PSGFrame shouldn't require more than 11 scanlines in worst case. | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
... if you check astroforce pause, you will find that the music plays from init when you unpause. A pause-resume (only for music) maintaining sound effects active would be great! |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
<3 Sverx | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
from PSGlib's readme:
but I didn't think about pausing music while leaving SFXs on. I will think about that, thanks for the suggestion! :) |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
not in public, mate ;) |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I'm working on PSGResume - to resume a tune previously stopped with PSGStop.
Will be integrated into devkitSMS soon. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Great! | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Done. It wasn't that hard ;)
Let me know if something isn't working as expected. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
<3 Sverx | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
LOL! :D |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Does anyone succeeded in running this on the newer Master EverDrive?
I'm just curious, as even if they say it supports 4 MB ROMs I just found people complaining they couldn't run this no matter what. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
It should work. I was planning to buy one so would be good to know if there are issues. | ||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I heard something like the upper part is used for the "OS" features and thus you can't use the whole 4MB. I guess the answer is to make some test ROMs? | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() Last edited by psidum on Mon Jun 10, 2019 12:11 am; edited 1 time in total |
|||||||||||||||||||||||||||
Created a simple test to get us started.
Test ROM with 256 banks. Each bank past first two filled with its corresponding bank number. Guessing there would be reports if issues is in first two and lazy about dealing with header. Tests are done on the banks. On screen a 16x16 grid representing the status of the tests is filled with blue or red entries depending on the success of each bank test. If a bank is found to fail the contents of this bank are copied to cart ram for us to check out. I assume it is the last bank only that has issues but we can adjust the test if needed to inspect other anomalies if they arise. Asking anyone with a 4MB Everdrive if they could test this ROM and let us know the results in the grid. If you could also attach the 16kb ram file which will be in same directory as ROM that would be great. The file won’t be generated until the test is run on hardware. EDIT: updated attachment to latest version. Stores entire 1st bank with error in cartram0 slot 1, 2 bytes from ever bank (regardless of success/failure) in cartram1. First 4 bytes will be garbage as first 2 banks are skipped. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
We did some testing today.
After psidum and me finished the testrom, we got badsector to try it on his new Everdrive. The tests revealed that the Everdrive at its current state only supports ROMs up to 1 MB. We still need to find out if this limitation comes from the OS or from the hardware. At least there seem to be a few "improvements" compared to the old Everdrive:
If anyone wants to help figuring out if it's only the OS that is at fault, your help is appreciated. :) |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Did you test reading back from $FFFF? I suspect if it's the OS that gets in the way, you'd find here the number you had set ANDed with $3F. If it's the CPLD logic at fault, instead, you'll probably read back from $FFFF the same value you wrote there and thus would mean that the mapper is still supporting up to 6 bits at max, just as is was on the 'old' model. No better idea on how to test that ATM. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Krikzz had responded to Psidum last Tuesday regarding this issue, and it is the game mapper code in the everdrive not decoding over 1MB. He has offered to replace carts if people need this. I have reached out to him to help with my everdrive as well. He could not post here unfortunately but he posted this in his forums (under Master Everdrive) in response to Psidum. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Link to the thread: http://krikzz.com/forum/index.php?topic=8914.0
Our anti-spam just blocks URLs from new users, I'm sorry if it causes trouble. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
So I ran the 4MB test on my Master Everdrive X7 and these are the results. I tried to run Bad Apple but it complains I am on a PAL machine. Is there an NTSC version to test or a patched version?
|
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I meant to say it complains that I am NOT on a PAL machine. I was under the assumption it would launch on an NTSC machine but just run faster. I guess not...
|
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
For another large ROM that's NTSC compatible, try http://www.smspower.org/forums/17097-HifiSamplePlayer#102779 which will just end earlier on a 1MB variant.
Extreme demos target PAL because there's a much larger proportion of time spent off screen. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Thanks for the tip! I will try that 4MB sample as soon as I get the chance. That should at least confirm (or deny) that the very latest cart can or cannot load 4MB roms. |
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
The blue squares indicate banks that read correctly, the red ones indicate banks that read wrong values. In your image it's the first 64 banks (i.e. the first 1 MB) that reads correctly and the rest reads wrong values. |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
Replace with a version that does work? |
||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
;)
|
||||||||||||||||||||||||||||
![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
@ichigo: what about a 'developer' version that can be connected through USB and rewritten freely? ;) | ||||||||||||||||||||||||||||
![]() ![]() ![]() |
||||||||||||||||||||||||||||
|
![]() |
|||||||||||||||||||||||||||
I've already made my own dumper / writer ;)
|
||||||||||||||||||||||||||||
![]() ![]() |
![]() |
Goto page 1, 2 Next |