Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Off-topic inspiring technical stuff

Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
  • Joined: 14 Apr 2013
  • Posts: 623
Reply with quote
Post Posted: Wed Jul 15, 2015 7:13 pm
Last edited by Calindro on Wed Jul 15, 2015 9:12 pm; edited 2 times in total
Kroc wrote
Just thought I'd share an interesting Z80 technique I came across looking for a fast way to fill memory in Windows (via
http://stackoverflow.com/questions/387654/why-is-there-no-z80-like-ldir-functionality-in-c-c-rtl/388442#388442)

You temporarily set the stack pointer to the area you want to clear and then just push the stack down repeatedly to fill the memory! This is supposedly 4x as fast as a typical write look.

  LD DE, SP       
  LD HL, 0
  LD BC, 0x1800   ; Size of screen
  LD SP, 0x4000   ; Start of screen
LOOP:
  PUSH HL
  DEC BC
  JNZ LOOP
  LD SP, DE

That JNZ gotta be a hidden magical operation of the Z80 that allows checking the result of the previous operation without checking any flags because
dec bc

doesn't touch the flags. :P
We've discussed a similar method here (reading instead of clearing using the SP): http://www.smspower.org/forums/15469-ChunkyToPlanarOnSMS
It should also be noted that "Size of screen" is measured in words rather than in bytes - otherwise it would need to dec bc twice.
For unrolled loops it's
11 cycles per word vs 32 cycles per word which is almost 3 times as fast.
With
loop:
push hl      ; 11 cyc
dec bc       ; 6 cyc
ld a,b       ; 4 cyc
or c         ; 4 cyc
jp nz,loop   ; 10 cyc

against
ldir   ; 21 cyc

It's 35 cycles per word against 42 cycles per word which is 20% faster.
So "4 times as fast" is just a myth.
  View user's profile Send private message Visit poster's website
  • Joined: 17 Sep 2013
  • Posts: 128
  • Location: Gravataí, RS, Brazil
Reply with quote
Post Posted: Wed Jul 15, 2015 8:31 pm
actually, for filling a buffer the only caution needed is to leave two bytes free on the top of the buffer, or as many bytes as necessary to run the NMI handler.

But in my opinion, the stack pointer could be more usefull to iterate on a buffer, and this is much more hard keep NMI-safe.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Post Posted: Thu Jul 16, 2015 5:28 am
Here's some actual code for the Spectrum:
; Fast clear-screen routine
; Uses the stack to block clear memory
;
Clear_Screen_Fast:  LD (Clear_Screen_Fast_End+1),SP ; Store the stack (self modding code)
            LD SP,&5800         ; Set stack to end of screen
            LD DE,&0000         ; We are clearing, so set DE to 0
            LD B,0              ; We loop 256 times - 12 words * 256 = 6144 bytes
Clear_Screen_Fast_Loop: DS 12,&D5           ; &D5 is the code for PUSH DE - this is 12 PUSH DE's           
            DJNZ Clear_Screen_Fast_Loop
Clear_Screen_Fast_End:  LD SP,&0000         ; Restore the stack
            RET

It is able to make use of some things we can't - self modifying code, no fear of NMIs, and the unrolled loop fits into b because the size is always the same.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Jun 2005
  • Posts: 26
  • Location: Brazil - Florianópolis (SC)
Reply with quote
Post Posted: Mon Jul 27, 2015 2:03 pm
I know this is not a technical stuff, but a very inspiring project from Ni*****o:

https://www.youtube.com/watch?v=_e_Kpcrx6X0

Imagine this with alex kidd world, would be awesome
  View user's profile Send private message
  • Joined: 08 Dec 2013
  • Posts: 200
Reply with quote
Post Posted: Wed Jul 29, 2015 8:39 am
There is an Alex Kidd level editor!
http://emulicious.net/kidded/
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Dirty tricks in games
Post Posted: Mon Aug 03, 2015 9:51 pm
I'm not sure this ought to be inspiring...

http://www.gamasutra.com/view/feature/132500/dirty_coding_tricks.php

http://www.gamasutra.com/view/news/249475/More_dirty_coding_tricks_from_game_dev...
  View user's profile Send private message Visit poster's website
  • Joined: 09 Dec 2013
  • Posts: 228
  • Location: detroit
Reply with quote
Post Posted: Fri Aug 07, 2015 11:34 am
https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/the_movfuscator_r...

"The Movfuscator"
quote..
"Any code we write.. can be written as a set of MOVs instead... and nothing else"
  View user's profile Send private message
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Fri Aug 07, 2015 3:43 pm
dink wrote
https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/the_movfuscator_recon_2015.pdf

"The Movfuscator"
quote..
"Any code we write.. can be written as a set of MOVs instead... and nothing else"


I'm wondering whether I should fork it and make a version that outputs LDs... :P
  View user's profile Send private message Visit poster's website
  • Joined: 09 Dec 2013
  • Posts: 228
  • Location: detroit
Reply with quote
Post Posted: Sat Aug 08, 2015 2:52 am
haroldoop wrote
I'm wondering whether I should fork it and make a version that outputs LDs... :P


ha! do it! :D
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
VGA From Scratch
Post Posted: Thu Oct 15, 2015 11:22 pm
http://www.skrasser.com/blog/2015/09/05/vga-from-scratch/
http://www.skrasser.com/blog/2015/10/08/vga-from-scratch-part-2/

Generating VGA video signals (and demo-style effects) with only 7400 series logic.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Fri Oct 16, 2015 9:02 am
This had me inspired today to do some more SMS coding:

https://youtu.be/0xBklX3zkGs
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Unfolding The 8-Bit Era
Post Posted: Wed Dec 16, 2015 5:38 pm
Stitching from a live console
This is really cool.. we should do that in an emulator?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Post Posted: Wed Dec 16, 2015 7:20 pm
It's similar to my auto stitcher tool, except probably a bit more clever to find better matches and also to handle the fuzzy signal. Bisqwit's animation merger is more able to remove sprites, for example. I found it easier to tweak parameters while post processing frames than to find a robust way to do it right the first time, although having the ability to ensure full map coverage (in game scrolling in both directions) interactively would be very useful.

Also, my stitcher is in Pascal, C code without an intermediate compression stage ought to go faster - I don't think real-time stitching is hard to achieve.
  View user's profile Send private message Visit poster's website
  • Joined: 30 Mar 2009
  • Posts: 280
Reply with quote
Post Posted: Thu Dec 17, 2015 11:56 am
http://kotaku.com/watch-the-25-year-old-pc-version-of-super-mario-bros-3-1747962...

The id Software version of SMB3 on DOS.
(It's off-topic, but i'm a sucker for anything id software).
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Creating a NES emulator in C++11
Post Posted: Sun Dec 20, 2015 9:20 am
This is a 15 minutes video "tool assisted replay" of Bisqwit coding a very accurate NES emulator.


I think there's an important idea to consider here,
In design, my primary guiding principle was the assumption, that the _hardware_ was always designed for simplicity (with regards to chipspace consumption). Most compact design that gets the work done. This means, that whenever there is a behavior that seems to require extra-ordinary amount of work (code-lengthwise) from emulator authors to replicate accurately, I would take the extra effort to try and see the big picture and figure out how to generalize it. If the hardware does unproductive work at time, it is because they reused some component and did not needlessly create a special case to disable the component for those times where its function does not produce benefit. I would, rather than adding a special case to replicate that unproductive work, also find a way to reuse a productive part, so that the unproductive work comes automatically as a side effect, just like on the hardware.
I always tried to replicate that simplicity in my emulator. I think I managed quite well in that regard. It is not perfect though: It does not pass _all_ tests by Blargg, and some games that should run, outright crash at start. But the compatibility according to my tests is still very high, and interestingly, many TASes made with FCEUX run also on my emulator.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Rom Dumping via a vibration motor
Post Posted: Tue Feb 09, 2016 6:35 pm
http://www.sodnpoo.com/posts.xml/mediatek_mt6261_rom_dumping_via_the_vibration_m...
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Sat Apr 16, 2016 12:06 am
BitCity for GBC definitely has potential.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Jun 09, 2016 7:38 pm
This looks pretty amazing, considering the hardware:
I imagine it should be possible to make a similar 3D shooter for the SMS, as long as a similar lo-rez background is used.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Sun Jun 19, 2016 11:26 am
A former (Sega?) developer reminisces about his System 32 development environment: http://www.wizforest.com/diary/150315.html;p1

Other stories are in the same blog. Japanese only, sorry.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Dec 2013
  • Posts: 228
  • Location: detroit
Reply with quote
Post Posted: Tue Jul 05, 2016 11:26 pm
http://hackaday.com/2016/07/05/don-eyles-walks-us-through-the-lunar-module-sourc...
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Sega Saturn CD - Cracked after 20 years
Post Posted: Tue Jul 12, 2016 11:34 am
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Post Posted: Tue Jul 12, 2016 11:58 am
I was watching that this morning... it makes sense that we should see a transition from our current SD card ROM emulators for cartridge based systems, to a future age of CD drive emulators for disk based systems (which can be done in software on Wii, and maybe other modern systems with OS layers abstracting the device). The hard part is emulating the drive, even when you do have the whole bus exposed on the back of the console.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
The Floppotron
Post Posted: Thu Jul 14, 2016 1:37 pm
http://silent.org.pl/home/2016/07/06/return-of-the-floppies/
  View user's profile Send private message Visit poster's website
  • Joined: 14 Sep 2016
  • Posts: 2
  • Location: UK
Reply with quote
Post Posted: Wed Sep 14, 2016 9:26 pm
Maxim wrote
We need to get a competitive SMS version of Bad Apple done some day...

I would love to see this. Did anyone ever create an SMS version of the music? There is a NES version with great audio. :\
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Post Posted: Wed Sep 14, 2016 9:53 pm
I did a thing that can play the audio at near CD quality, but it does use all the CPU...
  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2013
  • Posts: 200
Reply with quote
Post Posted: Sat Dec 17, 2016 9:12 am
Some interesting stuff happening in the world of physical 8-bit releases:

The Oliver twins are releasing, on real NES cart, an unreleased 1992 platformer: https://www.kickstarter.com/projects/47744432/dreamworld-pogie-a-new-old-game-by...

An Ultima-like RPG being made for the C64 (and PC), with physical release: https://www.kickstarter.com/projects/stirringdragongames/unknown-realm-an-8bit-r...
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Dec 21, 2016 10:04 pm
A not-quite-complete but quite comprehensive reverse engineering of the Donkey Kong arcade ROMs (Z80 ASM).
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Dec 21, 2016 10:05 pm
pix2pix almost looks like magic:



And the examples on their original article look even more impressive.

I wonder what would be the result of combining this kind of algorithm with something like HiSMS
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 611
  • Location: Copenhagen, Denmark
Reply with quote
Janken-ready Joy-con controllers....
Post Posted: Sat Jan 14, 2017 1:23 pm
Yesterday I learned that the Ni****do Switch's Joy-con controllers can detect rock, scissors, paper gestures (inspiring technical stuff). Today I learned that the Lizardcube guys are developing for the Ni****do Switch... so now I am wondering: Is another Sega Master System classic game in the remake pipeline? :)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Feb 08, 2017 9:44 pm
Now, this, is also pretty cool:
https://arstechnica.com/information-technology/2017/02/google-brain-super-resolution-zoom-enhance/
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Apr 06, 2017 2:55 am
GBC + ARM +Wolf 3D = this.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Post Posted: Thu Apr 06, 2017 6:35 pm
Cool, almost a homebrew SVP/Super FX/etc.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Fri Apr 07, 2017 9:23 am
An impressive raycaster for the original MSX:

https://github.com/santiontanon/talesofpopolon

https://youtu.be/u9HiZfxoLmk

  View user's profile Send private message Visit poster's website
Revo
  • Guest
Reply with quote
Post Posted: Sat Apr 08, 2017 4:07 pm
I tried to convert this game on SMS, but only the title screen is working^^
 
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Sat Apr 08, 2017 6:26 pm
Revo wrote
I tried to convert this game on SMS, but only the title screen is working^^


Well, that's a good start... it's always nice when they release the source code. ;)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Apr 13, 2017 3:55 pm
A Simcity clone for the Game Boy, with C source:

https://github.com/AntonioND/ucity
screenshot.png (10.1 KB)
screenshot.png

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14682
  • Location: London
Reply with quote
Overdrive 2
Post Posted: Fri Apr 21, 2017 7:10 am
https://docs.google.com/document/d/1ST9GbFfPnIjLT5loytFCm3pB0kWQ1Oe34DCBBV8saY8/...



A Mega Drive demo doing what seems to be a lot of original tricks. I'm a bit curious about the mid frame height change on the SMS now...
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 611
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Fri Apr 21, 2017 8:29 am
Awesome!! ... as I watched it, I thought: "Hey - those guys are inspired by psidum's 2016 SMS-demo!" Then I realized psidum is one of those guys :) Truly impressive stuff!
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jan 2014
  • Posts: 331
Reply with quote
Post Posted: Fri Apr 21, 2017 11:37 pm
Thanks hang-on. Glad you enjoyed it!
  View user's profile Send private message
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Mon Apr 24, 2017 11:08 pm
An open source "Fantasy Console" that can be programmed in Python or Lua.

Quote

Open source Fantasy Console in Rust (with Python and Lua)

PX8 is an Open Source Fantasy Console (128x128 pixels) in Rust, by using a cartridge that contains the code/gfx/music. The code could be in Python/Lua, or you could create directly everything in pure Rust by using it as a library.

It is still in development, but it is usable and the main features are:

128x128 pixels default resolution
Predefined palettes (pico-8, c64, etc), or use any RGB colors
Python 3 / Lua 5.X support for the cartridge without tokens limit
Desktop/Mobile/Browser (Emscripten) support
Controls with dpad + 2 buttons (gamecontroller/joystick support)
Unlimited sprites (8x8)
Map support (128x32)
Edition of the cartridge data
PX8 format to be able to use your favorite code editor for Python/Lua/Rust
Change the screen definition (128x128, 256x256, WIDTHxHEIGHT)
Screenshot (PNG) / Video recording (GIF)
Pico-8 compatibility + cartridge (P8/P8.PNG) format support
Audio support is in progress

It works on all platforms (Linux/OSX/Windows), in the browser (via Emscripten), and on tiny hardware like Raspberry Pi 2/3.

The console is inspired from the awesome Pico-8, so there is a compatibility mode (not 100%) available with Pico-8 console and cartridges (P8/PNG).


https://github.com/Gigoteur/PX8

  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Tue Apr 25, 2017 5:19 am
Great job on the demo psidum, I haven't seen anything that looked (or sounded) that amazing in quite a while. Just wonderful stuff through and through!
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jan 2014
  • Posts: 331
Reply with quote
Post Posted: Tue Apr 25, 2017 2:39 pm
Thanks heaps Charles. I should thank you as well for the technical docs you put together. I have used them extensively getting to grips with sega hardware. I will pass your comments on to the guys at Titan as i know they will appreciate it.
  View user's profile Send private message
  • Joined: 01 Oct 2014
  • Posts: 27
  • Location: Sunnyvale, California
Reply with quote
Post Posted: Tue Apr 25, 2017 3:41 pm
A Mind Is Born, a 256 bytes demo for C64!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3757
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu May 04, 2017 8:57 am
Maxim wrote
A Mega Drive demo doing what seems to be a lot of original tricks.


Top notch stuff!!! Great work psidum (and Titan!)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Sat May 06, 2017 10:27 am
Lunar Limit for NES; it's impressive to see so many shots flying around on such a limited hardware.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Atari 2600
Post Posted: Fri Jun 23, 2017 6:51 pm
https://www.jwz.org/blog/2017/06/2600-video/
""As far as the Atari 2600's concerned, it's a cartridge - one that happens to have enough horsepower to read the audiovisual data off an SD card and feed it as a program to the 2600.""
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Tue Jul 18, 2017 10:08 pm
Others may have made it before, but it's still cool to see homebrewers adding extra joystick ports to cartridges.



FROGS/SHOTGUN 4-player cartridge (+2 Joystick Ports)

Quote
as some of you might know, there will be soon a nice little cartridge containing the 4-player games FROGS and SHOTGUN. And to make things even cooler, the cartridge will contain 2 additional joystick ports, which means that there is no need to use a separate 4-Player adapter etc. to play the games on the cartridge. It's the perfect party module, so to speak Cool
  View user's profile Send private message Visit poster's website
  • Joined: 30 Jun 2016
  • Posts: 194
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jul 19, 2017 2:13 am
The J-Cart shall rise again! I remember playing 4 player games on my Mega Drive thanks to those funky Codemasters carts!
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 863
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Aug 24, 2017 10:16 pm
This is a Spelunky clone for the MSX:

https://github.com/santiontanon/xspelunker

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Sun Sep 10, 2017 4:55 pm
Full little thing: emstrument
https://vimeo.com/150221247
http://signalnarrative.com/emstrument/index.html
  View user's profile Send private message Visit poster's website
Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next



Back to the top of this page

Back to SMS Power!