My hello world rom (Genesis) runs on emulator, but in everdrive doesn't.

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

Humberto Moura

New Member
Joined
Jan 2, 2017
Messages
1
Points
1
Age
39
Hello guys,
I made a hello world code based in Big evil corporation tutorial (https://bigevilcorporation.co.uk/2012/03/23/sega-megadrive-4-hello-world/), a great start tutorial.
I think I understood the code, I made several changes, it runs well in emulators like Gens and others. But when I try to run the code in the Mega Drive (Genesis) Hardware Throught "Everdrive" cartridge, it doesn't run. The screen stays black after the "licenced by Sega tm" words.

I compile my code in two forms:
asm68k /k /p /o ae- main.asm, final.bin >errors.txt, , hello.lst
asm68k /p main.asm,final.bin

The code compiles without error, but no runs on Megadrive 1 JP with everdrive. I tried with SNASM68k too. Same thing. Compiles well, ran on emulator, but everdrive doesn't.

After compile, I also used this two utilities to generate checksum:

gen-cksum.py final.bin
fixheadr.exe final.bin

I don't know what's going wrong, because I compile the Sonic 1 project hack at the same form and runs on mega drive with everdrive well.

I post all the source attached.
Thanks for any help, .
----------------------------------------------------------------------------------------------------
;main.asm
include 'init.asm'
include 'globals.asm'

__main:

move.w #0x8F02, vdp_control ; Configura o auto-incremento para 2 bytes
move.l #vdp_write_palettes, vdp_control ; configura a VDP para escrever na CRAM 0x0000C3

lea Paletas, a0 ; Carrega endereço da paleta para o registrador a0
move.l #0x07, d0 ; 32 bytes de dados (8 longwords, menos 1 para o contador) na paleta (2 pal = 0F)

.CorLoop:
move.l (a0)+, vdp_data ; Move os dados para a porta de dados da VDP, e incrementa o endereço de origem
dbra d0, .CorLoop

move.w #0x8706, vdp_control ; Configura a cor de fundo para paleta 0 cor 6 - amarelo

move.l #0x40200000, vdp_control ; Configura a VDP pra escrever no endereço da VRAM 0x0020
lea Caracteres, a0 ; Carrega endereço dos caracteres no a0
move.l #0x87, d0 ; (8 longwords * 8 letras = 64 longwords, menos 1 para contador) na fonte

@Loop:
move.l (a0)+, vdp_data ; Move dados para porta de dados da VDP, e incrementa endereço de origem
dbra d0, @Loop

move.l #vdp_write_plane_a, vdp_control ; Configura a VDP para escrever no endereço VRAM 0xC00000 (Plano A)

;plano A, paleta 0, sem girar, mais id do bloco (tile).
move.w #0x0008, vdp_data ; Pattern ID 09 - H
move.w #0x000F, vdp_data ; Pattern ID 07 - U
move.w #0x000B, vdp_data ; Pattern ID 0C - M
move.w #0x0002, vdp_data ; Pattern ID 0D - B
move.w #0x0005, vdp_data ; Pattern ID 00 - E
move.w #0x000D, vdp_data ; Pattern ID 17 - R
move.w #0x000E, vdp_data ; Pattern ID 01 - T
move.w #0x000C, vdp_data ; Pattern ID 10 - O
move.w #0x0000, vdp_data ; Pattern ID 00 -
move.w #0x000B, vdp_data ; Pattern ID 04 - M
move.w #0x000C, vdp_data ; Pattern ID 12 - O
move.w #0x000F, vdp_data ; Pattern ID 15 - U
move.w #0x000D, vdp_data ; Pattern ID 07 - R
move.w #0x0001, vdp_data ; Pattern ID 10 - A




include 'cores.asm'
include 'letras.asm'

__end ; Última linha. Fim do endereço da ROM.
 

Attachments

Last edited:
Top