NES C Programming Examples

  Рет қаралды 17,758

shiru8bit

shiru8bit

Күн бұрын

Пікірлер: 43
@jomo0825
@jomo0825 8 жыл бұрын
This is by far the BEST NES dev C library I've ever seen! The structure is neat and simple. And all examples are well addressed. I'm teaching game dev in 3 university at Taiwan and I'm considering to make a full tutorial series for Shiru's C library!
@lecapitaineisonyoutoob
@lecapitaineisonyoutoob 4 жыл бұрын
This is great. Lately also, there's been a GUI-based NES dev suite called NESMaker that's been compared to Unity, but still relies on 6502 assembly for code, leaving non-wizards in the dust when it comes to expanding beyond the ready-made templates. You think you could join forces? Assembly is pretty much the only thing left standing between us and a full-featured high-level NES dev environment.
@shiru8bit
@shiru8bit 4 жыл бұрын
Sorry, I'm not really interested in supporting someone's commercial initiative. Also, for whatever reason NESMaker community decided to define me as an 'assembly elitist', and kind of enemy of their state, so I'll prefer to stay away.
@2SUB-TV_space
@2SUB-TV_space 10 ай бұрын
@@shiru8bit Вначале, объясните толком как установить правильно Neslib? У меня постоянно выдаёт ошибку. То ищёт `example1.c', `example2.c' потом типа нет zeropage.inc', `crt0.s' и тд. Бред какой-то.. Я скачиваю с вашего официального сайта. Какие файлы можно удалить, какие нет? Папка .bin у меня с сс65 и тд. Брал даже с других проектов у людей.. Всё равно те же ошибки. А на счёт "Элитиста ассемблера" .. 😄 Наверное завидуют знаниям. Вообще, у них коммерческий проект и надо обоср@ть всех кто рядом.. Брать деньги за прогу, которая только помогает чуть кодить игры для ретро консолей... 🤔 Одно дело донаты.. Но выманивать 36 баксов.. По сути люди пишут игры по фану, а здесь жёсткая коммерция внедрилась. Даже смешно, честно говоря.
@NesrocksGamingVideos
@NesrocksGamingVideos 6 жыл бұрын
Just came back to say your song is awesome.
@NesrocksGamingVideos
@NesrocksGamingVideos 6 жыл бұрын
Hey Shiru amazing showcase. I also want to vote for that first song as being totally awesome.
@shiru8bit
@shiru8bit 6 жыл бұрын
Tnanks!
@thegreatawakening3601
@thegreatawakening3601 4 жыл бұрын
I’d like the make a geometry dash or impossible game type for nes.. Can’t believe no one thought of that back in the day.
@ShadedWarrior
@ShadedWarrior 8 жыл бұрын
I loooooove the music, especially the first song... do you listen to a lot of chiptune stuff? What tracker did you use? Thanks for the cool video.
@shiru8bit
@shiru8bit 8 жыл бұрын
I don't listen to chiptune stuff. The first song is for AY-3-8910, made wih Vortex Tracker II; the second is for the NES, made with FamiTracker.
@thisisreallyme3130
@thisisreallyme3130 2 жыл бұрын
Can we get more of this please?
@jeremyseay
@jeremyseay 6 жыл бұрын
How is there no flickering with more than 8 sprites per scanline?
@shiru8bit
@shiru8bit 6 жыл бұрын
There is. Not flickering, but disappearing, in fact - flickering needs to be implemented by hand in each game. In this demo it just looks like there is often more than 8 sprites per scanline, but in fact no, chances for 8 balls to take the same scanline is rare, and when it happens, extra sprites disappear like usual.
@shepardpower
@shepardpower 5 жыл бұрын
What’s the name of the first song?
@TalesCembraneliDantas
@TalesCembraneliDantas 9 жыл бұрын
I already create something for NES 6502, but in ASM, do you have a C compiler? how it works???
@lolwut5235
@lolwut5235 8 жыл бұрын
great, did you also make the bgm?
@shiru8bit
@shiru8bit 8 жыл бұрын
Yes, I composed both songs used in the video.
@davidfigaromacintosh
@davidfigaromacintosh 8 жыл бұрын
Hi Shiru, I am actually doing my own NES homebrew game and I have one question: How actually BG collision detection works? How to do it in asm6??? If you know where should I look for the answer, please give me a link or sth =3 Thanks Nice work btw =P
@shiru8bit
@shiru8bit 8 жыл бұрын
Collision detection is not related to any particular platform or CPU or assembler, so you can just search for general 2D game programming basics. NES particular case is the tile grid collisions. You just need to translate a pixel world space coordinates into (meta) tile coordinates in the level map, fetch the tile, and decide either it solid or not (by index, or table of flags, or something). I.e. divide pixel coords to tile size, then calculate offset in the tile array (pixel_y/tile_height*map_width+pixel_x/tile_width). That's actually demo'ed in the example 11 of this video, line 395 and get_metatile function.
@davidfigaromacintosh
@davidfigaromacintosh 8 жыл бұрын
Ah, now I got it, thanks a lot =P Oh, and one more thing: Is there a website where I can publish my homebrew?
@shiru8bit
@shiru8bit 8 жыл бұрын
If you want just post the ROM for free download, check nintendoage.com forums. If you want to get your game published on actual cartridge, there is a number of homebrew publishers out there. Piko Interactive, 8bitcollective, Second Dimension, RetroUSB to name a few.
@mtnnoonan
@mtnnoonan 10 жыл бұрын
Speedy as any ASM I've seen...
@atirutwattanamongkol8806
@atirutwattanamongkol8806 2 жыл бұрын
How is that amount of sprites possible without flickering?
@shiru8bit
@shiru8bit 2 жыл бұрын
It just happens so they're rarely intersects in amounts of 8+ per scan line, this creates the illusion of the lack of flickering.
@creative3179
@creative3179 8 жыл бұрын
Pretty cool stuff.
@valdirsalgueiro9087
@valdirsalgueiro9087 4 жыл бұрын
Any examples of horizontal scrolling? I know it can be modified to do that, but i still cant wrap my head to some of the concepts in the source code. Besides being unable to debug doesnt help either(of course it isnt neslib fault)
@shiru8bit
@shiru8bit 4 жыл бұрын
Sorry, I don't have an example for horizontal one. It is much the same, just needs to use vertical column updates, and attribute calculations has to be modified. Info from NesDev.com wiki one the topic could be handy to understand.
@Oddlyoko2K
@Oddlyoko2K 8 жыл бұрын
This is all very confusing as most tutorials on the internet use 6502 assembly language as examples so you'll have to learn assembly and have a nice knowledge of C before making complex scripts.
@fixedgerald
@fixedgerald 7 жыл бұрын
When I try to run the compile all batch file I get this error: ld65: Error: nrom_128_horz.cfg(53): Attribute expected, got '__STACKSIZE__' Anyone know how to fix this?
@shiru8bit
@shiru8bit 7 жыл бұрын
The examples has been made for an older CC65 version, 2.13.3. Later versions had various changes, including introduced incompatibility in the linker attributes. I never migrated the examples to the latest version, because tests shown decrease in perfomance of the compiled code, with no obvious improvements/critical fixes that would justify it. So you either need to get the older CC65, or, if you deem perfomance not so important, edit the config file according to the latest docs.
@fixedgerald
@fixedgerald 7 жыл бұрын
Thanks!
@fixedgerald
@fixedgerald 7 жыл бұрын
Do you know where I can download version 2.13.3? I can find the source on github but not the binary's.
@shiru8bit
@shiru8bit 7 жыл бұрын
Sorry, I have no idea. Many things has changed since, CC65 project and website changed owners, etc. I just kept the older binaries around since then.
@shiru8bit
@shiru8bit 7 жыл бұрын
Actually I checked the old FTP, and files seem to be there: ftp://ftp.musoftware.de/pub/uz/cc65/
@grandlovania8454
@grandlovania8454 4 жыл бұрын
Hi I know it has nearly nothing to do with that but I would like to know how could I use your Neslib + Famitracker player with the MMC3 Mapper
@shiru8bit
@shiru8bit 4 жыл бұрын
It depends a lot on how you're using MMC3 mapper in your program. I guess your actual question boils down to how to use bankswitching with cc65, which is a broad topic with a number of possible approaches. You can see one in my HEOHDEMO source code: shiru.untergrund.net/files/nes/heohdemo_final_version.zip
@grandlovania8454
@grandlovania8454 4 жыл бұрын
@@shiru8bit Thanks a lot! :D
@softhwarangpark870
@softhwarangpark870 4 жыл бұрын
An error occurs in the latest version of cc65 (Windows) cc65-win32-2.13.2-1 : csdb.dk/release/?id=6032 I checked to build properly in this version.
@shiru8bit
@shiru8bit 4 жыл бұрын
This code is not meant for the latest version. You either need to use 2.13.3 svn5495, or modify the code to work with newer versions.
@SitronXie
@SitronXie Жыл бұрын
:)
Why does an NES cartridge have two ROM chips inside?
8:01
Brad Smith
Рет қаралды 67 М.
Coding NES Subroutines
8:15
NesHacker
Рет қаралды 58 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
NES Graphics Explained
17:23
NesHacker
Рет қаралды 247 М.
Alwa's Awakening NES - Part 1: Backgrounds
7:57
Brad Smith
Рет қаралды 10 М.
NES Development Environment
14:58
NesHacker
Рет қаралды 358 М.
BACK TO THE PET - a demo for Commodore PET
4:24
shiru8bit
Рет қаралды 31 М.
How Super Mario Bros Was Made Into 40 Kilobytes
9:21
Joseph R Carroll
Рет қаралды 981 М.
Writing NES Games! With Assembly!!
11:40
Coding Tech
Рет қаралды 634 М.
The Making of: ROM City Rampage (Retro City Rampage)
10:45
VblankEntertainment
Рет қаралды 394 М.
HEOHdemo - an NES demo
4:04
shiru8bit
Рет қаралды 49 М.
The Nintendo Entertainment System's Loading Seam
5:31
Retro Game Mechanics Explained
Рет қаралды 842 М.