#6502kernel (OS for 6502-based systems)

1 messages · Page 1 of 1 (latest)

pulsar cargo
pulsar cargo
#

so rn to prepare for the filesystem refactor, i first changed the file name limit from 64 to 48, so i could make the cluster size 64 bytes and have the rest of the properties fit in 16 bytes

#

next i will probably make the actual fat table

#

the thing is that i generate the FS with ca65 (macro assembler) macros

#

but thankfully ca65 is very flexible so i can generate and use vars/labels programatically with .ident

pulsar cargo
#

ok now i got the FAT table actually written at compile-time by ca65

#

now it's time to implement the required changes for the LAB_xxxx and fgetc functions to at least get sh to be loaded into memory and run grins

pulsar cargo
#

now the LAB_xxxx (and now fgetc) functions work with the new fs

#

and that makes fopen work as well

pulsar cargo
#

now, every syscall that accesses the FS is fixed to use the new fat-like fs

#

other than mkdir...

lyric umbra
#

Unix V1 on a C64?

pulsar cargo
#

kinda? it's not a complete unix-like but i did do some things in a more unix way

#

especially recently i've started doing syscalls and shit in a more unix-type fashion (using the same names and for instance)

pulsar cargo
#

finally, after 1.5 fucking hours of torture and screaming, mkdir now works in my new FS

#

all because of two lines missing from readdir breaking ls somehow 😭

pulsar cargo
#

and now 6502kernel works on my (currently very basic) 6502 computer emulator

#

it currently has 16k rom for the OS (which just uploads the kernel to RAM), a timer and a basic image reader (set address -> read from data reg)

pulsar cargo
#

i added a keyboard to the emulator and modified the getch syscall to use it and it worked first try 🔥

mortal junco
#

running your os on your emu

#

pretty impressive

pulsar cargo
#

it's just a 6502, so emulating it is dead simple

#

but my 6502 emulator is cycle accurate troll

pulsar cargo
#

so, for the older C64 version of this OS i made a SID player that plays PSID files

#

but my new customer computer uses an AY-3-8910 soundchip, which makes the sid command useless

#

so i'm making a .pt3 player (pt3 is a format used a bunch of AY music trackers) that's for 6502

#

since most .pt3 players are for Z80-based platforms (the pt3 format originated from the zx spectrum, that's why)

pulsar cargo
pulsar cargo
ionic yoke
#

please port to BBC micro!

pulsar cargo
#

maybe if it has a timer IRQ :D

ionic yoke
#

you likely want 6522 VIA Timer 1

#

if I remember right

#

the one that drives the sound stuff

#

yeah 100hz event

pulsar cargo
#

so this channel has kinda been dead for a few days

#

but in that time i had been working on an super mario bros. port for my 6502 computer

#

since it and the NES use very similar CPUs

ionic yoke
#

yay, what about sprite hardware and stuff, do you have an equivalent, like a blitter or something?

pulsar cargo
#

i have 64 sprites with a 2bpp palette

#

each sprite can use one of the first 16 2bpp palletes in pallete memory (there's a total of 32 shared between the bg and sprites)

#

it's already playable btw, i just have to add/fix sprite priorities and add sound (since i use an AY-3-8910 sound chip and the NES uses a custom APU [audio processing unit] in the CPU chip [2a03] itself)

ionic yoke
#

that's really cool! are the sprites in layers or is it just whatever you call first rendered below?

#

because rn mario stands in front of pipes

#

like you said, sprite priorities

pulsar cargo
#

it's my own 6502 computer anyway, i can add whatever i want technically

digital osprey
#

neat, how are you keeping the hud in it's place? do you also have sprite 0 hit or is it just a scanline interrupt

pulsar cargo
#

i just use a scanline interrupt