Skip to content

Commit

Permalink
show warning of mapper is not nrom
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed Jul 26, 2023
1 parent a5eb919 commit 1587d51
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,8 @@ func getFiles(options *options.Program) ([]string, error) {
return files, nil
}

// nolint: cyclop
// nolint: cyclop, funlen
func disasmFile(logger *log.Logger, opts *options.Program, disasmOptions *options.Disassembler) error {
if !opts.Quiet {
logger.Info("Processing ROM", log.String("file", opts.Input))
}

file, err := os.Open(opts.Input)
if err != nil {
return fmt.Errorf("opening file '%s': %w", opts.Input, err)
Expand All @@ -146,6 +142,15 @@ func disasmFile(logger *log.Logger, opts *options.Program, disasmOptions *option
}
_ = file.Close()

if !opts.Quiet {
logger.Info("Processing ROM",
log.String("file", opts.Input),
log.Uint8("mapper", cart.Mapper))
}
if cart.Mapper != 0 {
logger.Warn("Only NROM (mapper 0) is currently supported, multi bank mapper support is still in development")
}

if err := openCodeDataLog(opts, disasmOptions); err != nil {
return err
}
Expand Down

0 comments on commit 1587d51

Please sign in to comment.